Re: Support EXCEPT for ALL SEQUENCES publications

From: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
To: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>
Subject: Re: Support EXCEPT for ALL SEQUENCES publications
Date: 2026-06-26 12:38:27
Message-ID: CANhcyEW_4=OECRiHStsCJUJ_Ng-V=EJ+Oaeji4uk3s4yazqUBg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 26 Jun 2026 at 14:23, shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> Please find a few trivial comments on v13-001:
>
> 1)
>
> check_publication_add_relation:
>
> + * 'pubrelkind' is the relkind accepted by the publication clause,
> + * while 'targetrelkind' is the relkind of the relation being added.
>
> pubrelkind is the argument while targetrelkind is not. We generally
> explain arguements here.
>
> Can we rephrase to:
> * 'pubrelkind' is the relkind accepted by the publication clause.
> * The relkind of relation in given 'pri' is checked for compatibility
> * against it. Error is emitted if they are not compatible.
>
> 2)
> describePublications:
>
> }
> - else
> + if (puballtables)
> {
>
> Now since else is converted to independent 'if' block we can add a
> blank line before it for better readability.
>
> Same for this:
>
> }
> + if (puballsequences)
> + {
>
>
> 3)
>
> We have each test header like below starting from begining of file:
>
> ---------------------------------------------
> -- Tests for inherited tables, and
> -- EXCEPT clause tests for inherited tables
> ---------------------------------------------
>
> ---------------------------------------------
> -- EXCEPT clause tests for partitioned tables
> ---------------------------------------------
>
> So we can convert ours too in above format so that it is more visible:
> +-- Test ALL SEQUENCES with EXCEPT clause
>
> 4)
> We can add these tests to sql file:
>
> a) SEQ keyword equivalent test to below table one:
>
> -- fail - first table in the EXCEPT list should use TABLE keyword
> CREATE PUBLICATION testpub_foralltables_excepttable2 FOR ALL TABLES
> EXCEPT (testpub_tbl1, testpub_tbl2);
>
> b) Try to add either of temporay or unlogged seq to except list.
>
I have addressed all the comments. I have also addressed the comments
by Peter in [1].
Please find the updated v14 patch.

[1]: https://www.postgresql.org/message-id/CAHut%2BPsgCQa2hcT8TNqejV3y4U5ouj%3DZCOLMxgVGvBrUEkLaKg%40mail.gmail.com

Thanks,
Shlok Kyal

Attachment Content-Type Size
v14-0001-Support-EXCEPT-for-ALL-SEQUENCES-in-CREATE-PUBLI.patch application/octet-stream 64.0 KB
v14-0002-Support-EXCEPT-for-ALL-SEQUENCES-in-ALTER-PUBLIC.patch application/octet-stream 30.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2026-06-26 12:41:50 Re: [PATCH] Add hook for plugins to acquire sample rows during ANALYZE
Previous Message Andrey Borodin 2026-06-26 11:13:52 Re: [PATCH] btree_gist: add cross-type integer operator support for GiST