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

Commitbe92769

Browse files
committed
Set proargmodes for satisfies_hash_partition.
It appears that proargmodes should always be set for variadicfunctions, but satifies_hash_partition had it as NULL. In addition tofixing the problem, add a regression test to guard against futuremistakes of this type.
1 parent11e2645 commitbe92769

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO201711092
56+
#defineCATALOG_VERSION_NO201711171
5757

5858
#endif

‎src/include/catalog/pg_proc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5523,7 +5523,7 @@ DATA(insert OID = 3354 ( pg_ls_waldir PGNSP PGUID 12 10 20 0 0 f f f f t t
55235523
DESCR("list of files in the WAL directory");
55245524

55255525
/* hash partitioning constraint function */
5526-
DATA(insert OID = 5028 ( satisfies_hash_partition PGNSP PGUID 12 1 0 2276 0 f f f f f f i s 4 0 16 "26 23 23 2276" _null__null_ _null_ _null_ _null_ satisfies_hash_partition _null_ _null_ _null_ ));
5526+
DATA(insert OID = 5028 ( satisfies_hash_partition PGNSP PGUID 12 1 0 2276 0 f f f f f f i s 4 0 16 "26 23 23 2276" _null_"{i,i,i,v}" _null_ _null_ _null_ satisfies_hash_partition _null_ _null_ _null_ ));
55275527
DESCR("hash partition CHECK constraint");
55285528

55295529
/*

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,17 @@ AND case proargtypes[array_length(proargtypes, 1)-1]
147147
-----+-------------+-------------
148148
(0 rows)
149149

150+
-- Check that all and only those functions with a variadic type have
151+
-- a variadic argument.
152+
SELECT oid::regprocedure, proargmodes, provariadic
153+
FROM pg_proc
154+
WHERE (proargmodes IS NOT NULL AND 'v' = any(proargmodes))
155+
IS DISTINCT FROM
156+
(provariadic != 0);
157+
oid | proargmodes | provariadic
158+
-----+-------------+-------------
159+
(0 rows)
160+
150161
-- As of 8.0, this check finds refcursor, which is borrowing
151162
-- other types' I/O routines
152163
SELECT p1.oid, p1.typname, p2.oid, p2.proname

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ AND case proargtypes[array_length(proargtypes, 1)-1]
120120
WHEREt.typarray= proargtypes[array_length(proargtypes,1)-1])
121121
END!= provariadic;
122122

123+
-- Check that all and only those functions with a variadic type have
124+
-- a variadic argument.
125+
SELECToid::regprocedure, proargmodes, provariadic
126+
FROM pg_proc
127+
WHERE (proargmodesIS NOT NULLAND'v'= any(proargmodes))
128+
IS DISTINCTFROM
129+
(provariadic!=0);
130+
123131
-- As of 8.0, this check finds refcursor, which is borrowing
124132
-- other types' I/O routines
125133
SELECTp1.oid,p1.typname,p2.oid,p2.proname

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp