summaryrefslogtreecommitdiff
path: root/src/backend/nodes/print.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/nodes/print.c
parentae793ff63cb9167ea6d0f24ca018ffabad157ece (diff)
downloadpostgresql-6c412f0605afeb809014553ff7ad28cf9ed5526b.tar.gz
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/nodes/print.c')
-rw-r--r--src/backend/nodes/print.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/backend/nodes/print.c b/src/backend/nodes/print.c
index 3e5b5bb78f..9d6511cf50 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);
}