Thread
-
Re: Support EXCEPT for TABLES IN SCHEMA publications
Nisha Moond <nisha.moond412@gmail.com> — 2026-05-04T12:05:39Z
On Wed, Apr 29, 2026 at 11:16 AM Peter Smith <smithpb2250@gmail.com> wrote: > > Hi Nisha. > > Some review comments for v4-0001 (docs only). > Thank you Peter for the review. > ====== > doc/src/sgml/ref/create_publication.sgml > > 1. > + TABLES IN SCHEMA { <replaceable > class="parameter">schema_name</replaceable> | CURRENT_SCHEMA } [ > EXCEPT ( <replaceable > class="parameter">except_table_object</replaceable> [, ... ] ) ] [, > ... ] > > It is ambiguous which part does that last ellipsis applies to? > > Consider instead: > > TABLES IN SCHEMA tables_in_schema [, ... ] > > and tables_in_schema is: > { schema_name | CURRENT_SCHEMA } [ EXCEPT ( except_table_object [, ... ] ) ] > > ~~~ Fixed. > > 2. > <para> > This clause specifies a list of tables to be excluded from the > - publication. > + publication. It can be used with both <literal>FOR ALL TABLES</literal> > + and <literal>FOR TABLES IN SCHEMA</literal>. > </para> > > Saying "both" may imply they can coexist, but they cannot. > > SUGGESTION > It can be used with <literal>FOR ALL TABLES</literal> or <literal>FOR > TABLES IN SCHEMA</literal>. > > ~~~ Fixed. > > 3. > + <para> > + Create a publication that publishes all changes for all the tables > present in > + the schema <structname>sales</structname>, except > + <structname>sales.internal</structname> and > <structname>sales.drafts</structname>: > +<programlisting> > +CREATE PUBLICATION sales_filtered FOR TABLES IN SCHEMA sales EXCEPT > (TABLE sales.internal, sales.drafts); > +</programlisting> > + </para> > + > > AFAIK, the tables in the EXCEPT clause do not need to be > schema-qualified, so they should not be written that way in the > programlisting part of this example, because it might give the user > the impression that schema-qualified names are required. > Done, matched with nearby examples. All of the above comments are addressed in v5-0001 patch. -- Thanks, Nisha