From 6c412f0605afeb809014553ff7ad28cf9ed5526b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 1 May 2005 18:56:19 +0000 Subject: 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. --- src/backend/nodes/print.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/backend/nodes/print.c') diff --git a/src/backend/nodes/print.c b/src/backend/nodes/print.c index 3e5b5bb78fc..9d6511cf508 100644 --- a/src/backend/nodes/print.c +++ b/src/backend/nodes/print.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.75 2005/04/19 22:35:15 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.76 2005/05/01 18:56:18 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -345,7 +345,6 @@ print_expr(Node *expr, List *rtable) { Const *c = (Const *) expr; Oid typoutput; - Oid typioparam; bool typIsVarlena; char *outputstr; @@ -356,12 +355,10 @@ print_expr(Node *expr, List *rtable) } getTypeOutputInfo(c->consttype, - &typoutput, &typioparam, &typIsVarlena); + &typoutput, &typIsVarlena); - outputstr = DatumGetCString(OidFunctionCall3(typoutput, - c->constvalue, - ObjectIdGetDatum(typioparam), - Int32GetDatum(-1))); + outputstr = DatumGetCString(OidFunctionCall1(typoutput, + c->constvalue)); printf("%s", outputstr); pfree(outputstr); } -- cgit v1.2.3