diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-05-30 04:25:00 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-05-30 04:25:00 +0000 |
commit | 0f1e39643de655f5103b09d5a82cadbf26a965c1 (patch) | |
tree | 32fa30338e5065afbc28df7dae4c2d2a0bce1569 /src/backend/utils/adt/arrayfuncs.c | |
parent | a12a23f0d03cc8bf22c6c38bc2394753ec34fcdf (diff) | |
download | postgresql-0f1e39643de655f5103b09d5a82cadbf26a965c1.tar.gz postgresql-0f1e39643de655f5103b09d5a82cadbf26a965c1.zip |
Third round of fmgr updates: eliminate calls using fmgr() and
fmgr_faddr() in favor of new-style calls. Lots of cleanup of
sloppy casts to use XXXGetDatum and DatumGetXXX ...
Diffstat (limited to 'src/backend/utils/adt/arrayfuncs.c')
-rw-r--r-- | src/backend/utils/adt/arrayfuncs.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index bd9ab6c60e7..6e6d32e08da 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.53 2000/05/29 21:02:32 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.54 2000/05/30 04:24:50 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -441,7 +441,10 @@ _ReadArrayStr(char *arrayStr, *q = '\0'; if (i >= nitems) elog(ERROR, "array_in: illformed array constant"); - values[i] = (*fmgr_faddr(inputproc)) (p, typelem, typmod); + values[i] = (char *) FunctionCall3(inputproc, + CStringGetDatum(p), + ObjectIdGetDatum(typelem), + Int32GetDatum(typmod)); p = ++q; if (!eoArray) @@ -669,21 +672,33 @@ array_out(ArrayType *v, Oid element_type) switch (typlen) { case 1: - values[i] = (*fmgr_faddr(&outputproc)) (*p, typelem, -1); + values[i] = DatumGetCString(FunctionCall3(&outputproc, + CharGetDatum(*p), + ObjectIdGetDatum(typelem), + Int32GetDatum(-1))); break; case 2: - values[i] = (*fmgr_faddr(&outputproc)) (*(int16 *) p, typelem, -1); + values[i] = DatumGetCString(FunctionCall3(&outputproc, + Int16GetDatum(*(int16 *) p), + ObjectIdGetDatum(typelem), + Int32GetDatum(-1))); break; case 3: case 4: - values[i] = (*fmgr_faddr(&outputproc)) (*(int32 *) p, typelem, -1); + values[i] = DatumGetCString(FunctionCall3(&outputproc, + Int32GetDatum(*(int32 *) p), + ObjectIdGetDatum(typelem), + Int32GetDatum(-1))); break; } p += typlen; } else { - values[i] = (*fmgr_faddr(&outputproc)) (p, typelem, -1); + values[i] = DatumGetCString(FunctionCall3(&outputproc, + PointerGetDatum(p), + ObjectIdGetDatum(typelem), + Int32GetDatum(-1))); if (typlen > 0) p += typlen; else |