pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Change syntax of EXCEPT TABLE clause in publication commands.
5+ messages / 4 participants
[nested] [flat]
* pgsql: Change syntax of EXCEPT TABLE clause in publication commands.
@ 2026-03-31 04:18 Amit Kapila <akapila@postgresql.org>
0 siblings, 1 reply; 5+ messages in thread
From: Amit Kapila @ 2026-03-31 04:18 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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.
Reported-by: Masahiko Sawada <sawada.mshk@gmail.com>
Author: vignesh C <vignesh21@gmail.com>
Author: Shlok Kyal <shlok.kyal.oss@gmail.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Zhijie Hou <houzj.fnst@fujitsu.com>
Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>
Reviewed-by: SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/CAD21AoCC8XuwfX62qKBSfHUAoww_XB3_84HjswgL9jxQy696yw@mail.gmail.com
Discussion: https://postgr.es/m/CALDaNm3=JrucjhiiwsYQw5-PGtBHFONa6F7hhWCXMsGvh=tamA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5984ea868eeeb202bddedfbdaca81adfe7ea6779
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 2 +-
doc/src/sgml/logical-replication.sgml | 2 +-
doc/src/sgml/ref/alter_publication.sgml | 28 ++++++------
doc/src/sgml/ref/create_publication.sgml | 20 +++++----
src/backend/catalog/pg_publication.c | 6 +--
src/backend/commands/publicationcmds.c | 2 +-
src/backend/parser/gram.y | 10 ++---
src/bin/pg_dump/pg_dump.c | 16 +++----
src/bin/pg_dump/t/002_pg_dump.pl | 12 +++---
src/bin/psql/describe.c | 2 +-
src/bin/psql/tab-complete.in.c | 28 ++++++------
src/test/regress/expected/publication.out | 71 ++++++++++++++++++++-----------
src/test/regress/sql/publication.sql | 59 ++++++++++++++-----------
src/test/subscription/t/037_except.pl | 52 +++++++++++-----------
14 files changed, 176 insertions(+), 134 deletions(-)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Change syntax of EXCEPT TABLE clause in publication commands.
@ 2026-03-31 04:47 Pavel Stehule <pavel.stehule@gmail.com>
parent: Amit Kapila <akapila@postgresql.org>
0 siblings, 2 replies; 5+ messages in thread
From: Pavel Stehule @ 2026-03-31 04:47 UTC (permalink / raw)
To: Amit Kapila <akapila@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org
Hi
út 31. 3. 2026 v 6:18 odesílatel Amit Kapila <akapila@postgresql.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, ...);
Regards
Pavel
>
> Reported-by: Masahiko Sawada <sawada.mshk@gmail.com>
> Author: vignesh C <vignesh21@gmail.com>
> Author: Shlok Kyal <shlok.kyal.oss@gmail.com>
> Reviewed-by: shveta malik <shveta.malik@gmail.com>
> Reviewed-by: Peter Smith <smithpb2250@gmail.com>
> Reviewed-by: Zhijie Hou <houzj.fnst@fujitsu.com>
> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>
> Reviewed-by: SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
> Discussion:
> https://postgr.es/m/CAD21AoCC8XuwfX62qKBSfHUAoww_XB3_84HjswgL9jxQy696yw@mail.gmail.com
> Discussion:
> https://postgr.es/m/CALDaNm3=JrucjhiiwsYQw5-PGtBHFONa6F7hhWCXMsGvh=tamA@mail.gmail.com
>
> Branch
> ------
> master
>
> Details
> -------
>
> https://git.postgresql.org/pg/commitdiff/5984ea868eeeb202bddedfbdaca81adfe7ea6779
>
> Modified Files
> --------------
> doc/src/sgml/catalogs.sgml | 2 +-
> doc/src/sgml/logical-replication.sgml | 2 +-
> doc/src/sgml/ref/alter_publication.sgml | 28 ++++++------
> doc/src/sgml/ref/create_publication.sgml | 20 +++++----
> src/backend/catalog/pg_publication.c | 6 +--
> src/backend/commands/publicationcmds.c | 2 +-
> src/backend/parser/gram.y | 10 ++---
> src/bin/pg_dump/pg_dump.c | 16 +++----
> src/bin/pg_dump/t/002_pg_dump.pl | 12 +++---
> src/bin/psql/describe.c | 2 +-
> src/bin/psql/tab-complete.in.c | 28 ++++++------
> src/test/regress/expected/publication.out | 71
> ++++++++++++++++++++-----------
> src/test/regress/sql/publication.sql | 59 ++++++++++++++-----------
> src/test/subscription/t/037_except.pl | 52 +++++++++++-----------
> 14 files changed, 176 insertions(+), 134 deletions(-)
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Change syntax of EXCEPT TABLE clause in publication commands.
@ 2026-03-31 05:00 shveta malik <shveta.malik@gmail.com>
parent: Pavel Stehule <pavel.stehule@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: shveta malik @ 2026-03-31 05:00 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: Amit Kapila <akapila@postgresql.org>; pgsql-committers@lists.postgresql.org, shveta malik <shveta.malik@gmail.com>
On Tue, Mar 31, 2026 at 10:17 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>
> Hi
>
> út 31. 3. 2026 v 6:18 odesílatel Amit Kapila <akapila@postgresql.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%40ma...
thanks
Shveta
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Change syntax of EXCEPT TABLE clause in publication commands.
@ 2026-03-31 05:01 Amit Kapila <amit.kapila16@gmail.com>
parent: Pavel Stehule <pavel.stehule@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Amit Kapila @ 2026-03-31 05:01 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: Amit Kapila <akapila@postgresql.org>; pgsql-committers@lists.postgresql.org
On Tue, Mar 31, 2026 at 10:17 AM Pavel Stehule <pavel.stehule@gmail.com>
wrote:
>
> út 31. 3. 2026 v 6:18 odesílatel Amit Kapila <akapila@postgresql.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?
>
We discussed this during the development. See email[1].
>
> Cannot be just:
>
> CREATE PUBLICATION ... FOR ALL TABLES EXCEPT (t1, ...);
>
Consider cases where we need to exclude all tables in schema. So we can
have something like: CREATE PUBLICATION ... FOR ALL TABLES EXCEPT (SCHEMA
t1, ...);. We need a way to distinguish whether the exclusion object is a
schema or table similar to what is present inclusion list like CREATE
PUBLICATION ... FOR TABLE t1, TABLES IN SCHEMA s1;
[1]:
https://www.postgresql.org/message-id/CAJpy0uB%3DJxTYXOB7VmrhVLR%2B1PG0%3DTtHuGekaqibOPpo2UBLiQ%40ma...
--
With Regards,
Amit Kapila
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Change syntax of EXCEPT TABLE clause in publication commands.
@ 2026-03-31 05:06 Pavel Stehule <pavel.stehule@gmail.com>
parent: Amit Kapila <amit.kapila16@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Pavel Stehule @ 2026-03-31 05:06 UTC (permalink / raw)
To: Amit Kapila <amit.kapila16@gmail.com>; +Cc: Amit Kapila <akapila@postgresql.org>; pgsql-committers@lists.postgresql.org
Hi
út 31. 3. 2026 v 7:01 odesílatel Amit Kapila <amit.kapila16@gmail.com>
napsal:
> On Tue, Mar 31, 2026 at 10:17 AM Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
> >
> > út 31. 3. 2026 v 6:18 odesílatel Amit Kapila <akapila@postgresql.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?
> >
>
> We discussed this during the development. See email[1].
>
> >
> > Cannot be just:
> >
> > CREATE PUBLICATION ... FOR ALL TABLES EXCEPT (t1, ...);
> >
>
> Consider cases where we need to exclude all tables in schema. So we can
> have something like: CREATE PUBLICATION ... FOR ALL TABLES EXCEPT (SCHEMA
> t1, ...);. We need a way to distinguish whether the exclusion object is a
> schema or table similar to what is present inclusion list like CREATE
> PUBLICATION ... FOR TABLE t1, TABLES IN SCHEMA s1;
>
> [1]:
> https://www.postgresql.org/message-id/CAJpy0uB%3DJxTYXOB7VmrhVLR%2B1PG0%3DTtHuGekaqibOPpo2UBLiQ%40ma...
>
make sense
Thank you for info
Regards
Pavel
>
> --
> With Regards,
> Amit Kapila
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2026-03-31 05:06 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-31 04:18 pgsql: Change syntax of EXCEPT TABLE clause in publication commands. Amit Kapila <akapila@postgresql.org>
2026-03-31 04:47 ` Pavel Stehule <pavel.stehule@gmail.com>
2026-03-31 05:00 ` shveta malik <shveta.malik@gmail.com>
2026-03-31 05:01 ` Amit Kapila <amit.kapila16@gmail.com>
2026-03-31 05:06 ` Pavel Stehule <pavel.stehule@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox