agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix incorrect declarations of variadic pg_get_*_ddl() functions.
Date: Tue, 23 Jun 2026 19:06:42 +0000
Message-ID: <E1wc6SI-001ZYa-0E@gemulon.postgresql.org> (raw)
Fix incorrect declarations of variadic pg_get_*_ddl() functions.
The final parameter of an ordinary variadic function should be an
array type. CREATE FUNCTION won't accept a declaration that isn't
like that, but it's possible to put an incorrect combination into a
pg_proc.dat entry. Sadly, the opr_sanity test that was supposed to
check that is broken and does not report functions with non-array
final parameters. This allowed exactly such a thinko to sneak into
the recently-added pg_get_*_ddl() functions: their last argument
should be declared text[] but was declared text. (We'd probably
have noticed eventually, when somebody tried to actually pass a
variadic array to one of those functions. But their regression
tests do not do that.)
Fix those functions, and fix the opr_sanity test so we'll notice
next time. Bump catversion for new pg_proc contents.
Author: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/D41A334E-ED9E-42EE-830D-28D4D36E9317@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2af70e9374789913c4d474e6fce2e69d7060202e
Modified Files
--------------
doc/src/sgml/func/func-info.sgml | 8 ++++----
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 14 +++++++-------
src/test/regress/expected/opr_sanity.out | 2 +-
src/test/regress/sql/opr_sanity.sql | 2 +-
5 files changed, 14 insertions(+), 14 deletions(-)
Message-ID: <E1wc6SI-001ZYa-0E@gemulon.postgresql.org>
Permalink: ../E1wc6SI-001ZYa-0E@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wc6SI-001ZYa-0E@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix incorrect declarations of variadic pg_get_*_ddl() functions.
In-Reply-To: <E1wc6SI-001ZYa-0E@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox