| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
| Cc: | Amit Kapila <akapila(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: pgsql: Change syntax of EXCEPT TABLE clause in publication commands. |
| Date: | 2026-03-31 05:06:51 |
| Message-ID: | CAFj8pRCB5Hpzq-6O8mznA_pJrejoaUhExbSAg9Xd_88rAn+8BA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Hi
út 31. 3. 2026 v 7:01 odesílatel Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
napsal:
> On Tue, Mar 31, 2026 at 10:17 AM Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
> >
> > ú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?
> >
>
> 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%40mail.gmail.com
>
make sense
Thank you for info
Regards
Pavel
>
> --
> With Regards,
> Amit Kapila
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2026-03-31 06:47:07 | pgsql: Disable some C++ warnings in MSVC |
| Previous Message | Amit Kapila | 2026-03-31 05:01:42 | Re: pgsql: Change syntax of EXCEPT TABLE clause in publication commands. |