Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements - Mailing list pgsql-hackers

From Akshay Joshi
Subject Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
Date
Msg-id CANxoLDco7z7Fj7_pj_3YQLvjq8ZH2Ai4c3GcOamed01fZhJ77Q@mail.gmail.com
Whole thread
In response to Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements  (Zsolt Parragi <zsolt.parragi@percona.com>)
Responses Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
List pgsql-hackers

On Thu, Jun 11, 2026 at 2:13 AM Zsolt Parragi <zsolt.parragi@percona.com> wrote:
Thanks for the update! The new version looks mostly good, I only found
one corner case that doesn't work, double quoted literals can still
get over-stripped:

CREATE SCHEMA s;
CREATE TABLE s.p (id int, "s.weird" int) PARTITION BY RANGE (id);
CREATE TABLE s.pc PARTITION OF s.p
    (CONSTRAINT chk CHECK ("s.weird" > 0)) FOR VALUES FROM (0) TO (100);
SELECT * FROM pg_get_table_ddl('s.pc', 'owner', 'false',
                               'schema_qualified', 'false');

  Fixed the issue above. The v5 patch is ready for review/testing.
 
Attachment

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Add pg_get_publication_ddl function
Next
From: "cca5507"
Date:
Subject: Re: [BUG] Take a long time to reach consistent after pg_rewind