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/utils/cache/lsyscache.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/backend/utils/cache/lsyscache.c') diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c index e46825212e1..5390d94462a 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/cache/lsyscache.c,v 1.124 2005/04/14 20:03:26 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/cache/lsyscache.c,v 1.125 2005/05/01 18:56:19 tgl Exp $ * * NOTES * Eventually, the index information should go through here, too. @@ -1214,6 +1214,10 @@ get_typlenbyvalalign(Oid typid, int16 *typlen, bool *typbyval, * to typelem elsewhere in the code are wrong, if they are associated with * I/O calls and not with actual subscripting operations! (But see * bootstrap.c, which can't conveniently use this routine.) + * + * As of PostgreSQL 8.1, output functions receive only the value itself + * and not any auxiliary parameters, so the name of this routine is now + * a bit of a misnomer ... it should be getTypeInputParam. */ Oid getTypeIOParam(HeapTuple typeTuple) @@ -1698,8 +1702,7 @@ getTypeInputInfo(Oid type, Oid *typInput, Oid *typIOParam) * Get info needed for printing values of a type */ void -getTypeOutputInfo(Oid type, Oid *typOutput, Oid *typIOParam, - bool *typIsVarlena) +getTypeOutputInfo(Oid type, Oid *typOutput, bool *typIsVarlena) { HeapTuple typeTuple; Form_pg_type pt; @@ -1723,7 +1726,6 @@ getTypeOutputInfo(Oid type, Oid *typOutput, Oid *typIOParam, format_type_be(type)))); *typOutput = pt->typoutput; - *typIOParam = getTypeIOParam(typeTuple); *typIsVarlena = (!pt->typbyval) && (pt->typlen == -1); ReleaseSysCache(typeTuple); @@ -1770,8 +1772,7 @@ getTypeBinaryInputInfo(Oid type, Oid *typReceive, Oid *typIOParam) * Get info needed for binary output of values of a type */ void -getTypeBinaryOutputInfo(Oid type, Oid *typSend, Oid *typIOParam, - bool *typIsVarlena) +getTypeBinaryOutputInfo(Oid type, Oid *typSend, bool *typIsVarlena) { HeapTuple typeTuple; Form_pg_type pt; @@ -1795,7 +1796,6 @@ getTypeBinaryOutputInfo(Oid type, Oid *typSend, Oid *typIOParam, format_type_be(type)))); *typSend = pt->typsend; - *typIOParam = getTypeIOParam(typeTuple); *typIsVarlena = (!pt->typbyval) && (pt->typlen == -1); ReleaseSysCache(typeTuple); -- cgit v1.2.3