From 7f8d2fe31c55a4d6f57077688faf4ca265083b93 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 30 Apr 2005 20:31:39 +0000 Subject: [PATCH] Change catalog entries for record_out and record_send to show only one argument, since that's all they are using now. Adjust type_sanity regression test so that it will complain if anyone tries to define multiple-argument output functions in future. --- src/include/catalog/catversion.h | 4 ++-- src/include/catalog/pg_proc.h | 6 +++--- src/test/regress/expected/type_sanity.out | 18 ++++++++---------- src/test/regress/sql/type_sanity.sql | 18 ++++++++---------- 4 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 43d538cba7..5916608374 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.265 2005/04/14 01:38:20 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.266 2005/04/30 20:31:37 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200504131 +#define CATALOG_VERSION_NO 200504301 #endif diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index 27c6cb7ea8..c1912c0998 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.359 2005/04/14 01:38:20 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.360 2005/04/30 20:31:38 tgl Exp $ * * NOTES * The script catalog/genbki.sh reads this file and generates .bki @@ -3221,7 +3221,7 @@ DESCR("current user privilege on tablespace by tablespace oid"); DATA(insert OID = 2290 ( record_in PGNSP PGUID 12 f f t f v 2 2249 "2275 26" _null_ _null_ _null_ record_in - _null_ )); DESCR("I/O"); -DATA(insert OID = 2291 ( record_out PGNSP PGUID 12 f f t f v 2 2275 "2249 26" _null_ _null_ _null_ record_out - _null_ )); +DATA(insert OID = 2291 ( record_out PGNSP PGUID 12 f f t f v 1 2275 "2249" _null_ _null_ _null_ record_out - _null_ )); DESCR("I/O"); DATA(insert OID = 2292 ( cstring_in PGNSP PGUID 12 f f t f i 1 2275 "2275" _null_ _null_ _null_ cstring_in - _null_ )); DESCR("I/O"); @@ -3364,7 +3364,7 @@ DATA(insert OID = 2401 ( array_send PGNSP PGUID 12 f f t f s 1 17 "2277" _n DESCR("I/O"); DATA(insert OID = 2402 ( record_recv PGNSP PGUID 12 f f t f v 2 2249 "2281 26" _null_ _null_ _null_ record_recv - _null_ )); DESCR("I/O"); -DATA(insert OID = 2403 ( record_send PGNSP PGUID 12 f f t f v 2 17 "2249 26" _null_ _null_ _null_ record_send - _null_ )); +DATA(insert OID = 2403 ( record_send PGNSP PGUID 12 f f t f v 1 17 "2249" _null_ _null_ _null_ record_send - _null_ )); DESCR("I/O"); DATA(insert OID = 2404 ( int2recv PGNSP PGUID 12 f f t f i 1 21 "2281" _null_ _null_ _null_ int2recv - _null_ )); DESCR("I/O"); diff --git a/src/test/regress/expected/type_sanity.out b/src/test/regress/expected/type_sanity.out index 881220bf28..0ff4391258 100644 --- a/src/test/regress/expected/type_sanity.out +++ b/src/test/regress/expected/type_sanity.out @@ -125,11 +125,10 @@ ORDER BY 1; SELECT p1.oid, p1.typname, p2.oid, p2.proname FROM pg_type AS p1, pg_proc AS p2 WHERE p1.typoutput = p2.oid AND p1.typtype in ('b', 'p') AND NOT - ((p2.pronargs = 1 AND p2.proargtypes[0] = p1.oid) OR - (p2.pronargs = 2 AND p2.proargtypes[0] = p1.oid AND - p2.proargtypes[1] = 'oid'::regtype) OR - (p2.oid = 'array_out'::regproc AND - p1.typelem != 0 AND p1.typlen = -1)) + (p2.pronargs = 1 AND + (p2.proargtypes[0] = p1.oid OR + (p2.oid = 'array_out'::regproc AND + p1.typelem != 0 AND p1.typlen = -1))) ORDER BY 1; oid | typname | oid | proname ------+-----------+-----+--------- @@ -188,11 +187,10 @@ ORDER BY 1; SELECT p1.oid, p1.typname, p2.oid, p2.proname FROM pg_type AS p1, pg_proc AS p2 WHERE p1.typsend = p2.oid AND p1.typtype in ('b', 'p') AND NOT - ((p2.pronargs = 1 AND p2.proargtypes[0] = p1.oid) OR - (p2.pronargs = 2 AND p2.proargtypes[0] = p1.oid AND - p2.proargtypes[1] = 'oid'::regtype) OR - (p2.oid = 'array_send'::regproc AND - p1.typelem != 0 AND p1.typlen = -1)) + (p2.pronargs = 1 AND + (p2.proargtypes[0] = p1.oid OR + (p2.oid = 'array_send'::regproc AND + p1.typelem != 0 AND p1.typlen = -1))) ORDER BY 1; oid | typname | oid | proname ------+-----------+------+---------- diff --git a/src/test/regress/sql/type_sanity.sql b/src/test/regress/sql/type_sanity.sql index 81f83525dd..2dc2c6267c 100644 --- a/src/test/regress/sql/type_sanity.sql +++ b/src/test/regress/sql/type_sanity.sql @@ -103,11 +103,10 @@ ORDER BY 1; SELECT p1.oid, p1.typname, p2.oid, p2.proname FROM pg_type AS p1, pg_proc AS p2 WHERE p1.typoutput = p2.oid AND p1.typtype in ('b', 'p') AND NOT - ((p2.pronargs = 1 AND p2.proargtypes[0] = p1.oid) OR - (p2.pronargs = 2 AND p2.proargtypes[0] = p1.oid AND - p2.proargtypes[1] = 'oid'::regtype) OR - (p2.oid = 'array_out'::regproc AND - p1.typelem != 0 AND p1.typlen = -1)) + (p2.pronargs = 1 AND + (p2.proargtypes[0] = p1.oid OR + (p2.oid = 'array_out'::regproc AND + p1.typelem != 0 AND p1.typlen = -1))) ORDER BY 1; SELECT p1.oid, p1.typname, p2.oid, p2.proname @@ -149,11 +148,10 @@ ORDER BY 1; SELECT p1.oid, p1.typname, p2.oid, p2.proname FROM pg_type AS p1, pg_proc AS p2 WHERE p1.typsend = p2.oid AND p1.typtype in ('b', 'p') AND NOT - ((p2.pronargs = 1 AND p2.proargtypes[0] = p1.oid) OR - (p2.pronargs = 2 AND p2.proargtypes[0] = p1.oid AND - p2.proargtypes[1] = 'oid'::regtype) OR - (p2.oid = 'array_send'::regproc AND - p1.typelem != 0 AND p1.typlen = -1)) + (p2.pronargs = 1 AND + (p2.proargtypes[0] = p1.oid OR + (p2.oid = 'array_send'::regproc AND + p1.typelem != 0 AND p1.typlen = -1))) ORDER BY 1; SELECT p1.oid, p1.typname, p2.oid, p2.proname -- 2.40.0