On Tue, Mar 31, 2026 at 10:17 AM Pavel Stehule <[email protected]> wrote: > > Hi > > út 31. 3. 2026 v 6:18 odesílatel Amit Kapila <[email protected]> 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
