Re: Support EXCEPT for TABLES IN SCHEMA publications - Mailing list pgsql-hackers

From Nisha Moond
Subject Re: Support EXCEPT for TABLES IN SCHEMA publications
Date
Msg-id CABdArM7ruJaa3js7o5C619YLESDhF1xfJOdmNnUE0PD30H31BA@mail.gmail.com
Whole thread
In response to Re: Support EXCEPT for TABLES IN SCHEMA publications  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: David Geier
Date:
Subject: Re: Wrong results with equality search using trigram index and non-deterministic collation
Next
From: Nisha Moond
Date:
Subject: Re: Support EXCEPT for TABLES IN SCHEMA publications