Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit19e3bdd

Browse files
committed
Minor catalog cleanups for composite-type stuff. Adjust signatures shown
in pg_proc for record_in, record_out, etc to reflect that these routinesnow make use of the second OID parameter. Remove the ancient SET entryin pg_type, which is now highly unlikely to ever become used again.Adjust type_sanity regression test to match.
1 parent62c3e61 commit19e3bdd

File tree

5 files changed

+34
-28
lines changed

5 files changed

+34
-28
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-2003, 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.233 2004/06/02 21:29:29 momjian Exp $
40+
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.234 2004/06/06 19:06:59 tgl Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO200406021
56+
#defineCATALOG_VERSION_NO200406061
5757

5858
#endif

‎src/include/catalog/pg_proc.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2003, 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.334 2004/06/02 21:29:29 momjian Exp $
10+
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.335 2004/06/06 19:07:00 tgl Exp $
1111
*
1212
* NOTES
1313
* The script catalog/genbki.sh reads this file and generates .bki
@@ -3179,9 +3179,9 @@ DATA(insert OID = 2273 ( has_schema_privilege PGNSP PGUID 12 f f t f s 2 16
31793179
DESCR("current user privilege on schema by schema oid");
31803180

31813181

3182-
DATA(insertOID=2290 (record_inPGNSPPGUID12fftfv12249"2275"_null_record_in-_null_ ));
3182+
DATA(insertOID=2290 (record_inPGNSPPGUID12fftfv22249"2275 26"_null_record_in-_null_ ));
31833183
DESCR("I/O");
3184-
DATA(insertOID=2291 (record_outPGNSPPGUID12fftfv12275"2249"_null_record_out-_null_ ));
3184+
DATA(insertOID=2291 (record_outPGNSPPGUID12fftfv22275"2249 26"_null_record_out-_null_ ));
31853185
DESCR("I/O");
31863186
DATA(insertOID=2292 (cstring_inPGNSPPGUID12fftfi12275"2275"_null_cstring_in-_null_ ));
31873187
DESCR("I/O");
@@ -3320,11 +3320,11 @@ DESCR("less-equal-greater");
33203320
/* send/receive functions */
33213321
DATA(insertOID=2400 (array_recvPGNSPPGUID12fftfs22277"2281 26"_null_array_recv-_null_ ));
33223322
DESCR("I/O");
3323-
DATA(insertOID=2401 (array_sendPGNSPPGUID12fftfs217"2277 26"_null_array_send-_null_ ));
3323+
DATA(insertOID=2401 (array_sendPGNSPPGUID12fftfs117"2277"_null_array_send-_null_ ));
33243324
DESCR("I/O");
3325-
DATA(insertOID=2402 (record_recvPGNSPPGUID12fftfv12249"2281"_null_record_recv-_null_ ));
3325+
DATA(insertOID=2402 (record_recvPGNSPPGUID12fftfv22249"2281 26"_null_record_recv-_null_ ));
33263326
DESCR("I/O");
3327-
DATA(insertOID=2403 (record_sendPGNSPPGUID12fftfv117"2249"_null_record_send-_null_ ));
3327+
DATA(insertOID=2403 (record_sendPGNSPPGUID12fftfv217"2249 26"_null_record_send-_null_ ));
33283328
DESCR("I/O");
33293329
DATA(insertOID=2404 (int2recvPGNSPPGUID12fftfi121"2281"_null_int2recv-_null_ ));
33303330
DESCR("I/O");

‎src/include/catalog/pg_type.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.152 2004/04/01 21:28:45 tgl Exp $
11+
* $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.153 2004/06/06 19:07:01 tgl Exp $
1212
*
1313
* NOTES
1414
* the genbki.sh script reads this file and generates .bki
@@ -304,9 +304,6 @@ DATA(insert OID = 30 (oidvector PGNSP PGUID INDEX_MAX_KEYS*4 f b t \054 0 26
304304
DESCR("array of INDEX_MAX_KEYS oids, used in system tables");
305305
#defineOIDVECTOROID30
306306

307-
DATA(insertOID=32 (SETPGNSPPGUID-1fbt \05400unknowninunknownout---ipf0-10_null__null_ ));
308-
DESCR("set of tuples");
309-
310307
DATA(insertOID=71 (pg_typePGNSPPGUID-1fct \05412470record_inrecord_outrecord_recvrecord_send-dxf0-10_null__null_ ));
311308
DATA(insertOID=75 (pg_attributePGNSPPGUID-1fct \05412490record_inrecord_outrecord_recvrecord_send-dxf0-10_null__null_ ));
312309
DATA(insertOID=81 (pg_procPGNSPPGUID-1fct \05412550record_inrecord_outrecord_recvrecord_send-dxf0-10_null__null_ ));

‎src/test/regress/expected/type_sanity.out

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ WHERE (p1.typtype = 'c' AND p1.typrelid = 0) OR
5656
(0 rows)
5757

5858
-- Look for basic types that don't have an array type.
59-
-- NOTE: as of 7.3, this check findsSET,smgr, and unknown.
59+
-- NOTE: as of 7.5, this check finds smgr and unknown.
6060
SELECT p1.oid, p1.typname
6161
FROM pg_type as p1
6262
WHERE p1.typtype in ('b') AND p1.typname NOT LIKE '\\_%' AND NOT EXISTS
@@ -65,10 +65,9 @@ WHERE p1.typtype in ('b') AND p1.typname NOT LIKE '\\_%' AND NOT EXISTS
6565
p2.typelem = p1.oid);
6666
oid | typname
6767
-----+---------
68-
32 | SET
6968
210 | smgr
7069
705 | unknown
71-
(3 rows)
70+
(2 rows)
7271

7372
-- Conversion routines must be provided except in 'c' entries.
7473
SELECT p1.oid, p1.typname
@@ -84,26 +83,27 @@ SELECT p1.oid, p1.typname, p2.oid, p2.proname
8483
FROM pg_type AS p1, pg_proc AS p2
8584
WHERE p1.typinput = p2.oid AND p1.typtype in ('b', 'p') AND NOT
8685
((p2.pronargs = 1 AND p2.proargtypes[0] = 'cstring'::regtype) OR
86+
(p2.pronargs = 2 AND p2.proargtypes[0] = 'cstring'::regtype AND
87+
p2.proargtypes[1] = 'oid'::regtype) OR
8788
(p2.pronargs = 3 AND p2.proargtypes[0] = 'cstring'::regtype AND
8889
p2.proargtypes[1] = 'oid'::regtype AND
8990
p2.proargtypes[2] = 'int4'::regtype));
9091
oid | typname | oid | proname
9192
-----+---------+-----+---------
9293
(0 rows)
9394

94-
-- As of 7.3, this check findsSET andrefcursor, whichare borrowing
95+
-- As of 7.5, this check finds refcursor, whichis borrowing
9596
-- other types' I/O routines
9697
SELECT p1.oid, p1.typname, p2.oid, p2.proname
9798
FROM pg_type AS p1, pg_proc AS p2
9899
WHERE p1.typinput = p2.oid AND p1.typtype in ('b', 'p') AND NOT
99100
(p1.typelem != 0 AND p1.typlen < 0) AND NOT
100101
(p2.prorettype = p1.oid AND NOT p2.proretset)
101102
ORDER BY 1;
102-
oid | typname | oid | proname
103-
------+-----------+-----+-----------
104-
32 | SET | 109 | unknownin
103+
oid | typname | oid | proname
104+
------+-----------+-----+---------
105105
1790 | refcursor | 46 | textin
106-
(2 rows)
106+
(1 row)
107107

108108
-- Varlena array types will point to array_in
109109
SELECT p1.oid, p1.typname, p2.oid, p2.proname
@@ -116,20 +116,21 @@ WHERE p1.typinput = p2.oid AND p1.typtype in ('b', 'p') AND
116116
(0 rows)
117117

118118
-- Check for bogus typoutput routines
119-
-- As of 7.3, this check findsSET andrefcursor, whichare borrowing
119+
-- As of 7.5, this check finds refcursor, whichis borrowing
120120
-- other types' I/O routines
121121
SELECT p1.oid, p1.typname, p2.oid, p2.proname
122122
FROM pg_type AS p1, pg_proc AS p2
123123
WHERE p1.typoutput = p2.oid AND p1.typtype in ('b', 'p') AND NOT
124124
((p2.pronargs = 1 AND p2.proargtypes[0] = p1.oid) OR
125+
(p2.pronargs = 2 AND p2.proargtypes[0] = p1.oid AND
126+
p2.proargtypes[1] = 'oid'::regtype) OR
125127
(p2.oid = 'array_out'::regproc AND
126128
p1.typelem != 0 AND p1.typlen = -1))
127129
ORDER BY 1;
128-
oid | typname | oid | proname
129-
------+-----------+-----+------------
130-
32 | SET | 110 | unknownout
130+
oid | typname | oid | proname
131+
------+-----------+-----+---------
131132
1790 | refcursor | 47 | textout
132-
(2 rows)
133+
(1 row)
133134

134135
SELECT p1.oid, p1.typname, p2.oid, p2.proname
135136
FROM pg_type AS p1, pg_proc AS p2
@@ -180,6 +181,8 @@ SELECT p1.oid, p1.typname, p2.oid, p2.proname
180181
FROM pg_type AS p1, pg_proc AS p2
181182
WHERE p1.typsend = p2.oid AND p1.typtype in ('b', 'p') AND NOT
182183
((p2.pronargs = 1 AND p2.proargtypes[0] = p1.oid) OR
184+
(p2.pronargs = 2 AND p2.proargtypes[0] = p1.oid AND
185+
p2.proargtypes[1] = 'oid'::regtype) OR
183186
(p2.oid = 'array_send'::regproc AND
184187
p1.typelem != 0 AND p1.typlen = -1))
185188
ORDER BY 1;

‎src/test/regress/sql/type_sanity.sql

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ WHERE (p1.typtype = 'c' AND p1.typrelid = 0) OR
5050
(p1.typtype!='c'ANDp1.typrelid!=0);
5151

5252
-- Look for basic types that don't have an array type.
53-
-- NOTE: as of 7.3, this check findsSET,smgr, and unknown.
53+
-- NOTE: as of 7.5, this check finds smgr and unknown.
5454

5555
SELECTp1.oid,p1.typname
5656
FROM pg_typeas p1
@@ -72,11 +72,13 @@ SELECT p1.oid, p1.typname, p2.oid, p2.proname
7272
FROM pg_typeAS p1, pg_procAS p2
7373
WHEREp1.typinput=p2.oidANDp1.typtypein ('b','p')AND NOT
7474
((p2.pronargs=1ANDp2.proargtypes[0]='cstring'::regtype)OR
75+
(p2.pronargs=2ANDp2.proargtypes[0]='cstring'::regtypeAND
76+
p2.proargtypes[1]='oid'::regtype)OR
7577
(p2.pronargs=3ANDp2.proargtypes[0]='cstring'::regtypeAND
7678
p2.proargtypes[1]='oid'::regtypeAND
7779
p2.proargtypes[2]='int4'::regtype));
7880

79-
-- As of 7.3, this check findsSET andrefcursor, whichare borrowing
81+
-- As of 7.5, this check finds refcursor, whichis borrowing
8082
-- other types' I/O routines
8183
SELECTp1.oid,p1.typname,p2.oid,p2.proname
8284
FROM pg_typeAS p1, pg_procAS p2
@@ -94,12 +96,14 @@ WHERE p1.typinput = p2.oid AND p1.typtype in ('b', 'p') AND
9496

9597
-- Check for bogus typoutput routines
9698

97-
-- As of 7.3, this check findsSET andrefcursor, whichare borrowing
99+
-- As of 7.5, this check finds refcursor, whichis borrowing
98100
-- other types' I/O routines
99101
SELECTp1.oid,p1.typname,p2.oid,p2.proname
100102
FROM pg_typeAS p1, pg_procAS p2
101103
WHEREp1.typoutput=p2.oidANDp1.typtypein ('b','p')AND NOT
102104
((p2.pronargs=1ANDp2.proargtypes[0]=p1.oid)OR
105+
(p2.pronargs=2ANDp2.proargtypes[0]=p1.oidAND
106+
p2.proargtypes[1]='oid'::regtype)OR
103107
(p2.oid='array_out'::regprocAND
104108
p1.typelem!=0ANDp1.typlen=-1))
105109
ORDER BY1;
@@ -142,6 +146,8 @@ SELECT p1.oid, p1.typname, p2.oid, p2.proname
142146
FROM pg_typeAS p1, pg_procAS p2
143147
WHEREp1.typsend=p2.oidANDp1.typtypein ('b','p')AND NOT
144148
((p2.pronargs=1ANDp2.proargtypes[0]=p1.oid)OR
149+
(p2.pronargs=2ANDp2.proargtypes[0]=p1.oidAND
150+
p2.proargtypes[1]='oid'::regtype)OR
145151
(p2.oid='array_send'::regprocAND
146152
p1.typelem!=0ANDp1.typlen=-1))
147153
ORDER BY1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp