mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
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.
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user