diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-05-01 18:56:19 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-05-01 18:56:19 +0000 |
commit | 6c412f0605afeb809014553ff7ad28cf9ed5526b (patch) | |
tree | 5540a678c19dcfa1a7023e0f59a970fe2a9a79ee /src/backend/utils/adt/ruleutils.c | |
parent | ae793ff63cb9167ea6d0f24ca018ffabad157ece (diff) | |
download | postgresql-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/ruleutils.c')
-rw-r--r-- | src/backend/utils/adt/ruleutils.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index d2f51de3c91..0c2d4ffa8c2 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -3,7 +3,7 @@ * back to source text * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.194 2005/04/30 08:08:50 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.195 2005/05/01 18:56:18 tgl Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -3594,7 +3594,6 @@ get_const_expr(Const *constval, deparse_context *context) { StringInfo buf = context->buf; Oid typoutput; - Oid typioparam; bool typIsVarlena; char *extval; char *valptr; @@ -3613,12 +3612,10 @@ get_const_expr(Const *constval, deparse_context *context) } getTypeOutputInfo(constval->consttype, - &typoutput, &typioparam, &typIsVarlena); + &typoutput, &typIsVarlena); - extval = DatumGetCString(OidFunctionCall3(typoutput, - constval->constvalue, - ObjectIdGetDatum(typioparam), - Int32GetDatum(-1))); + extval = DatumGetCString(OidFunctionCall1(typoutput, + constval->constvalue)); switch (constval->consttype) { |