Skip to content

Commit 7f8d2fe

Browse files
committed
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.
1 parent d7018ab commit 7f8d2fe

File tree

4 files changed

+21
-25
lines changed

4 files changed

+21
-25
lines changed

src/include/catalog/catversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
3838
* Portions Copyright (c) 1994, Regents of the University of California
3939
*
40-
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.265 2005/04/14 01:38:20 tgl Exp $
40+
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.266 2005/04/30 20:31:37 tgl Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/* yyyymmddN */
56-
#define CATALOG_VERSION_NO 200504131
56+
#define CATALOG_VERSION_NO 200504301
5757

5858
#endif

src/include/catalog/pg_proc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.359 2005/04/14 01:38:20 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.360 2005/04/30 20:31:38 tgl Exp $
1111
*
1212
* NOTES
1313
* The script catalog/genbki.sh reads this file and generates .bki
@@ -3221,7 +3221,7 @@ DESCR("current user privilege on tablespace by tablespace oid");
32213221

32223222
DATA(insert OID = 2290 ( record_in PGNSP PGUID 12 f f t f v 2 2249 "2275 26" _null_ _null_ _null_ record_in - _null_ ));
32233223
DESCR("I/O");
3224-
DATA(insert OID = 2291 ( record_out PGNSP PGUID 12 f f t f v 2 2275 "2249 26" _null_ _null_ _null_ record_out - _null_ ));
3224+
DATA(insert OID = 2291 ( record_out PGNSP PGUID 12 f f t f v 1 2275 "2249" _null_ _null_ _null_ record_out - _null_ ));
32253225
DESCR("I/O");
32263226
DATA(insert OID = 2292 ( cstring_in PGNSP PGUID 12 f f t f i 1 2275 "2275" _null_ _null_ _null_ cstring_in - _null_ ));
32273227
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
33643364
DESCR("I/O");
33653365
DATA(insert OID = 2402 ( record_recv PGNSP PGUID 12 f f t f v 2 2249 "2281 26" _null_ _null_ _null_ record_recv - _null_ ));
33663366
DESCR("I/O");
3367-
DATA(insert OID = 2403 ( record_send PGNSP PGUID 12 f f t f v 2 17 "2249 26" _null_ _null_ _null_ record_send - _null_ ));
3367+
DATA(insert OID = 2403 ( record_send PGNSP PGUID 12 f f t f v 1 17 "2249" _null_ _null_ _null_ record_send - _null_ ));
33683368
DESCR("I/O");
33693369
DATA(insert OID = 2404 ( int2recv PGNSP PGUID 12 f f t f i 1 21 "2281" _null_ _null_ _null_ int2recv - _null_ ));
33703370
DESCR("I/O");

src/test/regress/expected/type_sanity.out

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,10 @@ ORDER BY 1;
125125
SELECT p1.oid, p1.typname, p2.oid, p2.proname
126126
FROM pg_type AS p1, pg_proc AS p2
127127
WHERE p1.typoutput = p2.oid AND p1.typtype in ('b', 'p') AND NOT
128-
((p2.pronargs = 1 AND p2.proargtypes[0] = p1.oid) OR
129-
(p2.pronargs = 2 AND p2.proargtypes[0] = p1.oid AND
130-
p2.proargtypes[1] = 'oid'::regtype) OR
131-
(p2.oid = 'array_out'::regproc AND
132-
p1.typelem != 0 AND p1.typlen = -1))
128+
(p2.pronargs = 1 AND
129+
(p2.proargtypes[0] = p1.oid OR
130+
(p2.oid = 'array_out'::regproc AND
131+
p1.typelem != 0 AND p1.typlen = -1)))
133132
ORDER BY 1;
134133
oid | typname | oid | proname
135134
------+-----------+-----+---------
@@ -188,11 +187,10 @@ ORDER BY 1;
188187
SELECT p1.oid, p1.typname, p2.oid, p2.proname
189188
FROM pg_type AS p1, pg_proc AS p2
190189
WHERE p1.typsend = p2.oid AND p1.typtype in ('b', 'p') AND NOT
191-
((p2.pronargs = 1 AND p2.proargtypes[0] = p1.oid) OR
192-
(p2.pronargs = 2 AND p2.proargtypes[0] = p1.oid AND
193-
p2.proargtypes[1] = 'oid'::regtype) OR
194-
(p2.oid = 'array_send'::regproc AND
195-
p1.typelem != 0 AND p1.typlen = -1))
190+
(p2.pronargs = 1 AND
191+
(p2.proargtypes[0] = p1.oid OR
192+
(p2.oid = 'array_send'::regproc AND
193+
p1.typelem != 0 AND p1.typlen = -1)))
196194
ORDER BY 1;
197195
oid | typname | oid | proname
198196
------+-----------+------+----------

src/test/regress/sql/type_sanity.sql

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,10 @@ ORDER BY 1;
103103
SELECT p1.oid, p1.typname, p2.oid, p2.proname
104104
FROM pg_type AS p1, pg_proc AS p2
105105
WHERE p1.typoutput = p2.oid AND p1.typtype in ('b', 'p') AND NOT
106-
((p2.pronargs = 1 AND p2.proargtypes[0] = p1.oid) OR
107-
(p2.pronargs = 2 AND p2.proargtypes[0] = p1.oid AND
108-
p2.proargtypes[1] = 'oid'::regtype) OR
109-
(p2.oid = 'array_out'::regproc AND
110-
p1.typelem != 0 AND p1.typlen = -1))
106+
(p2.pronargs = 1 AND
107+
(p2.proargtypes[0] = p1.oid OR
108+
(p2.oid = 'array_out'::regproc AND
109+
p1.typelem != 0 AND p1.typlen = -1)))
111110
ORDER BY 1;
112111

113112
SELECT p1.oid, p1.typname, p2.oid, p2.proname
@@ -149,11 +148,10 @@ ORDER BY 1;
149148
SELECT p1.oid, p1.typname, p2.oid, p2.proname
150149
FROM pg_type AS p1, pg_proc AS p2
151150
WHERE p1.typsend = p2.oid AND p1.typtype in ('b', 'p') AND NOT
152-
((p2.pronargs = 1 AND p2.proargtypes[0] = p1.oid) OR
153-
(p2.pronargs = 2 AND p2.proargtypes[0] = p1.oid AND
154-
p2.proargtypes[1] = 'oid'::regtype) OR
155-
(p2.oid = 'array_send'::regproc AND
156-
p1.typelem != 0 AND p1.typlen = -1))
151+
(p2.pronargs = 1 AND
152+
(p2.proargtypes[0] = p1.oid OR
153+
(p2.oid = 'array_send'::regproc AND
154+
p1.typelem != 0 AND p1.typlen = -1)))
157155
ORDER BY 1;
158156

159157
SELECT p1.oid, p1.typname, p2.oid, p2.proname

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy