Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements

Chao Li <li.evan.chao@gmail.com>

From: Chao Li <li.evan.chao@gmail.com>
To: Akshay Joshi <akshay.joshi@enterprisedb.com>
Cc: Zsolt Parragi <zsolt.parragi@percona.com>, pgsql-hackers@lists.postgresql.org
Date: 2026-06-22T14:00:20Z
Lists: pgsql-hackers

> On Jun 22, 2026, at 20:40, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
> 
> You're right, and thanks for spotting this. The existing pattern in pg_proc.dat for variadic-text functions (e.g., jsonb_delete, json_extract_path) uses _text at the variadic position in both proargtypes and proallargtypes, with provariadic => 'text'. That is the convention documented by the sanity check in src/test/regress/sql/opr_sanity.sql.
> 
> The same issue applies to pg_get_role_ddl, pg_get_tablespace_ddl (both variants), and pg_get_database_ddl, but that will require a separate patch.
> 

Thanks for confirming. Then I will file a patch tomorrow to fix those.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/