Re: pgsql: Change syntax of EXCEPT TABLE clause in publication commands.

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Amit Kapila <akapila(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: pgsql: Change syntax of EXCEPT TABLE clause in publication commands.
Date: 2026-03-31 05:00:57
Message-ID: CAJpy0uBo3LM7RLXjmKXa=xXw7n=oaKz3OmpoXEiUsF0uh5UO5g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Tue, Mar 31, 2026 at 10:17 AM Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>
> Hi
>
> út 31. 3. 2026 v 6:18 odesílatel Amit Kapila <akapila(at)postgresql(dot)org> napsal:
>>
>> Change syntax of EXCEPT TABLE clause in publication commands.
>>
>> Adjust the syntax of the EXCEPT clause in CREATE/ALTER PUBLICATION
>> added in commits fd366065e0 and 493f8c6439 to move the TABLE keyword
>> inside the relation list.
>>
>> Old syntax:
>> CREATE PUBLICATION ... FOR ALL TABLES EXCEPT TABLE (t1, ...);
>> ALTER PUBLICATION ... SET ALL TABLES EXCEPT TABLE (t1, ...);
>>
>> New syntax:
>> CREATE PUBLICATION ... FOR ALL TABLES EXCEPT (TABLE t1, ...);
>> ALTER PUBLICATION ... SET ALL TABLES EXCEPT (TABLE t1, ...);
>>
>> This is to ensure that inclusion and exclusion list can be specified in
>> a same way. Previously, the exclusion table list can be specified as
>> TABLE (t1, t2, t3) and inclusion list can be specified as TABLE t1, t2,
>> t3, or TABLE t1, TABLE t2, TABLE t3.
>>
>> This change is purely syntactic and does not alter behavior.
>
>
> I am late, I am sorry. I don't think the new syntax is intuitive.
>
> Why is the keyword TABLE necessary there?
>
> Cannot be just:
>
> CREATE PUBLICATION ... FOR ALL TABLES EXCEPT (t1, ...);
>

Please see [1] for the details on why the TABLE keyword is required.

[1]: https://www.postgresql.org/message-id/CAJpy0uB%3DJxTYXOB7VmrhVLR%2B1PG0%3DTtHuGekaqibOPpo2UBLiQ%40mail.gmail.com

thanks
Shveta

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2026-03-31 05:01:42 Re: pgsql: Change syntax of EXCEPT TABLE clause in publication commands.
Previous Message Amit Langote 2026-03-31 04:53:57 pgsql: Add fast path for foreign key constraint checks