Re: Fix variadic argument types for pg_get_xxx_ddl() functions
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chao Li <li.evan.chao@gmail.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>,
Andrew Dunstan <andrew@dunslane.net>,
Akshay Joshi <akshay.joshi@enterprisedb.com>
Date: 2026-06-23T18:47:29Z
Lists: pgsql-hackers
Chao Li <li.evan.chao@gmail.com> writes: > On Jun 23, 2026, at 10:11, Chao Li <li.evan.chao@gmail.com> wrote: >> Then I checked why the sanity check didn’t report the issue. I found that the check used != for the comparison. When the final argument type is not an array type, the subquery returns NULL, and NULL != provariadic evaluates to NULL rather than true. I fixed the check to use IS DISTINCT FROM. After that, it reported the mismatch: Ouch. Yes, that regression test is clearly one brick shy of a load. We need to update the documentation for these functions too, and maybe some other places. regards, tom lane
Commits
-
Fix incorrect declarations of variadic pg_get_*_ddl() functions.
- 2af70e937478 19 (unreleased) landed