Re: Add pg_get_publication_ddl function - Mailing list pgsql-hackers

From Peter Smith
Subject Re: Add pg_get_publication_ddl function
Date
Msg-id CAHut+PtMmPfq0Lish0ZnRvMCEeBdkts9+_Kp8VK3Hmd2HKferA@mail.gmail.com
Whole thread
In response to Re: Add pg_get_publication_ddl function  ("Jonathan Gonzalez V." <jonathan.abdiel@gmail.com>)
Responses Re: Add pg_get_publication_ddl function
List pgsql-hackers
On Tue, Jun 9, 2026 at 9:15 PM Jonathan Gonzalez V.
<jonathan.abdiel@gmail.com> wrote:
>
> Peter Smith <smithpb2250@gmail.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



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: DOCS - "Get Object DDL Functions" table improvements
Next
From: Philip Alger
Date:
Subject: Re: Add pg_get_publication_ddl function