aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/varlena.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-05-01 18:56:19 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-05-01 18:56:19 +0000
commit6c412f0605afeb809014553ff7ad28cf9ed5526b (patch)
tree5540a678c19dcfa1a7023e0f59a970fe2a9a79ee /src/backend/utils/adt/varlena.c
parentae793ff63cb9167ea6d0f24ca018ffabad157ece (diff)
downloadpostgresql-6c412f0605afeb809014553ff7ad28cf9ed5526b.tar.gz
postgresql-6c412f0605afeb809014553ff7ad28cf9ed5526b.zip
Change CREATE TYPE to require datatype output and send functions to have
only one argument. (Per recent discussion, the option to accept multiple arguments is pretty useless for user-defined types, and would be a likely source of security holes if it was used.) Simplify call sites of output/send functions to not bother passing more than one argument.
Diffstat (limited to 'src/backend/utils/adt/varlena.c')
-rw-r--r--src/backend/utils/adt/varlena.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 26fcab20d35..0022ab5effd 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.119 2005/02/23 22:46:17 neilc Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.120 2005/05/01 18:56:18 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2174,7 +2174,6 @@ array_to_text(PG_FUNCTION_ARGS)
int typlen;
bool typbyval;
char typalign;
- Oid typioparam;
StringInfo result_str = makeStringInfo();
int i;
ArrayMetaState *my_extra;
@@ -2221,7 +2220,6 @@ array_to_text(PG_FUNCTION_ARGS)
typlen = my_extra->typlen;
typbyval = my_extra->typbyval;
typalign = my_extra->typalign;
- typioparam = my_extra->typioparam;
for (i = 0; i < nitems; i++)
{
@@ -2230,10 +2228,8 @@ array_to_text(PG_FUNCTION_ARGS)
itemvalue = fetch_att(p, typbyval, typlen);
- value = DatumGetCString(FunctionCall3(&my_extra->proc,
- itemvalue,
- ObjectIdGetDatum(typioparam),
- Int32GetDatum(-1)));
+ value = DatumGetCString(FunctionCall1(&my_extra->proc,
+ itemvalue));
if (i > 0)
appendStringInfo(result_str, "%s%s", fldsep, value);