diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-06 00:41:28 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-06 00:41:28 +0000 |
commit | c541bb86e9ec8fed37b23df6a0df703d0bde4dfa (patch) | |
tree | b4cff96eecc86e338274ec5d7355918efe9c149e /src/backend/utils/adt/varlena.c | |
parent | c3a153afed84e29dac664bdc6123724a9e3a906f (diff) | |
download | postgresql-c541bb86e9ec8fed37b23df6a0df703d0bde4dfa.tar.gz postgresql-c541bb86e9ec8fed37b23df6a0df703d0bde4dfa.zip |
Infrastructure for I/O of composite types: arrange for the I/O routines
of a composite type to get that type's OID as their second parameter,
in place of typelem which is useless. The actual changes are mostly
centralized in getTypeInputInfo and siblings, but I had to fix a few
places that were fetching pg_type.typelem for themselves instead of
using the lsyscache.c routines. Also, I renamed all the related variables
from 'typelem' to 'typioparam' to discourage people from assuming that
they necessarily contain array element types.
Diffstat (limited to 'src/backend/utils/adt/varlena.c')
-rw-r--r-- | src/backend/utils/adt/varlena.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index b1dc69ee90a..53ac27ddf2d 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.114 2004/05/30 23:40:36 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.115 2004/06/06 00:41:27 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -2172,7 +2172,7 @@ array_to_text(PG_FUNCTION_ARGS) int typlen; bool typbyval; char typalign; - Oid typelem; + Oid typioparam; StringInfo result_str = makeStringInfo(); int i; ArrayMetaState *my_extra; @@ -2211,7 +2211,7 @@ array_to_text(PG_FUNCTION_ARGS) get_type_io_data(element_type, IOFunc_output, &my_extra->typlen, &my_extra->typbyval, &my_extra->typalign, &my_extra->typdelim, - &my_extra->typelem, &my_extra->typiofunc); + &my_extra->typioparam, &my_extra->typiofunc); fmgr_info_cxt(my_extra->typiofunc, &my_extra->proc, fcinfo->flinfo->fn_mcxt); my_extra->element_type = element_type; @@ -2219,7 +2219,7 @@ array_to_text(PG_FUNCTION_ARGS) typlen = my_extra->typlen; typbyval = my_extra->typbyval; typalign = my_extra->typalign; - typelem = my_extra->typelem; + typioparam = my_extra->typioparam; for (i = 0; i < nitems; i++) { @@ -2230,7 +2230,7 @@ array_to_text(PG_FUNCTION_ARGS) value = DatumGetCString(FunctionCall3(&my_extra->proc, itemvalue, - ObjectIdGetDatum(typelem), + ObjectIdGetDatum(typioparam), Int32GetDatum(-1))); if (i > 0) |