Re: Add pg_get_publication_ddl function

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: "Jonathan Gonzalez V(dot)" <jonathan(dot)abdiel(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add pg_get_publication_ddl function
Date: 2026-06-11 02:01:22
Message-ID: CAHut+PtMmPfq0Lish0ZnRvMCEeBdkts9+_Kp8VK3Hmd2HKferA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 9, 2026 at 9:15 PM Jonathan Gonzalez V.
<jonathan(dot)abdiel(at)gmail(dot)com> wrote:
>
> Peter Smith <smithpb2250(at)gmail(dot)com> writes:
>
...
> > 2.
> > + <para>
> > + Reconstructs the <command>CREATE PUBLICATION</command> statement for
> > + the specified publication (by OID or name), followed by an
> > + <command>ALTER PUBLICATION ... OWNER TO</command> statement (the
> > + <command>CREATE PUBLICATION</command> grammar has no
> > + <literal>OWNER</literal> clause). Each statement is returned as a
> > + separate row. An error is raised if no publication with the supplied
> > + OID or name exists. When the publication was created with
> > + <literal>FOR ALL TABLES, ALL SEQUENCES</literal>, the emitted
> > + statement always lists <literal>ALL TABLES</literal> before
> > + <literal>ALL SEQUENCES</literal> regardless of the original order.
> > + The following options are supported:
> > + <literal>pretty</literal> (boolean) for formatted output and
> > + <literal>owner</literal> (boolean) to include
> > + <literal>OWNER</literal>.
> > + </para></entry>
> >
> > 2a.
> > That "CREATE PUBLICATION" should <link> back to the CREATE PUBLICATION
> > docs page.
>
> This is indeed a good idea, I would love to see this also in the other
> patchs, probably another patch to update all the functions will be good.
> Applied for the next version
>
...
>
> > ~~~
> >
> > GENERAL
> >
> > 3.
> > It would be better if the the rows of "Table 9.96" were in alphabetical order.
>
> I think that this should be done in a different patch when all or a big
> part of the functions are merged.
>

FYI, I've created another thread [1] to address those things above,

======
[1] https://www.postgresql.org/message-id/CAHut+Pun9Z8qZFJTa9fLgdhM=Cip9d-cnx2YXDW6eFrSwbQj1g@mail.gmail.com

Kind Regards,
Peter Smith.
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Alger 2026-06-11 02:11:09 Re: Add pg_get_publication_ddl function
Previous Message Peter Smith 2026-06-11 01:54:03 DOCS - "Get Object DDL Functions" table improvements