mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Set proargmodes for satisfies_hash_partition.
It appears that proargmodes should always be set for variadic functions, but satifies_hash_partition had it as NULL. In addition to fixing the problem, add a regression test to guard against future mistakes of this type.
This commit is contained in:
@ -53,6 +53,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* yyyymmddN */
|
/* yyyymmddN */
|
||||||
#define CATALOG_VERSION_NO 201711092
|
#define CATALOG_VERSION_NO 201711171
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -5523,7 +5523,7 @@ DATA(insert OID = 3354 ( pg_ls_waldir PGNSP PGUID 12 10 20 0 0 f f f f t t
|
|||||||
DESCR("list of files in the WAL directory");
|
DESCR("list of files in the WAL directory");
|
||||||
|
|
||||||
/* hash partitioning constraint function */
|
/* hash partitioning constraint function */
|
||||||
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_ ));
|
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_ ));
|
||||||
DESCR("hash partition CHECK constraint");
|
DESCR("hash partition CHECK constraint");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -147,6 +147,17 @@ AND case proargtypes[array_length(proargtypes, 1)-1]
|
|||||||
-----+-------------+-------------
|
-----+-------------+-------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
|
-- Check that all and only those functions with a variadic type have
|
||||||
|
-- a variadic argument.
|
||||||
|
SELECT oid::regprocedure, proargmodes, provariadic
|
||||||
|
FROM pg_proc
|
||||||
|
WHERE (proargmodes IS NOT NULL AND 'v' = any(proargmodes))
|
||||||
|
IS DISTINCT FROM
|
||||||
|
(provariadic != 0);
|
||||||
|
oid | proargmodes | provariadic
|
||||||
|
-----+-------------+-------------
|
||||||
|
(0 rows)
|
||||||
|
|
||||||
-- As of 8.0, this check finds refcursor, which is borrowing
|
-- As of 8.0, this check finds refcursor, which is borrowing
|
||||||
-- other types' I/O routines
|
-- other types' I/O routines
|
||||||
SELECT p1.oid, p1.typname, p2.oid, p2.proname
|
SELECT p1.oid, p1.typname, p2.oid, p2.proname
|
||||||
|
@ -120,6 +120,14 @@ AND case proargtypes[array_length(proargtypes, 1)-1]
|
|||||||
WHERE t.typarray = proargtypes[array_length(proargtypes, 1)-1])
|
WHERE t.typarray = proargtypes[array_length(proargtypes, 1)-1])
|
||||||
END != provariadic;
|
END != provariadic;
|
||||||
|
|
||||||
|
-- Check that all and only those functions with a variadic type have
|
||||||
|
-- a variadic argument.
|
||||||
|
SELECT oid::regprocedure, proargmodes, provariadic
|
||||||
|
FROM pg_proc
|
||||||
|
WHERE (proargmodes IS NOT NULL AND 'v' = any(proargmodes))
|
||||||
|
IS DISTINCT FROM
|
||||||
|
(provariadic != 0);
|
||||||
|
|
||||||
-- As of 8.0, this check finds refcursor, which is borrowing
|
-- As of 8.0, this check finds refcursor, which is borrowing
|
||||||
-- other types' I/O routines
|
-- other types' I/O routines
|
||||||
SELECT p1.oid, p1.typname, p2.oid, p2.proname
|
SELECT p1.oid, p1.typname, p2.oid, p2.proname
|
||||||
|
Reference in New Issue
Block a user