Re: Support EXCEPT for TABLES IN SCHEMA publications

From: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: shveta malik <shveta(dot)malik(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: Support EXCEPT for TABLES IN SCHEMA publications
Date: 2026-07-15 16:48:47
Message-ID: CABdArM7YU3aUKTzkLc5AZ9WxmHZHN=tjLNtKVApMj6dJt=BUpw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 15, 2026 at 2:13 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> Hi Nisha.
>
> Here are my review comments for all the rest of the v20* patches
>

Thanks for the review. I've addressed all the comments as suggested in v21.

>
> 3.
> Something about this logic seems over-complicated to me.
>
> e.g. All this stuff about `schema_repeated`?
>
> AFAICT, you only need to be accumulating 2 lists
> - list1 = schemas without EXCEPT
> - list2 = schemas with EXCEPT
>
> To check conflicting the logic is simple:
> - before adding to list1 ensure same schema is not already in list2, else error
> - before adding to list2 ensure same schema is not already in list1, else error
>
> Those checks can be done before you verify the qualified schema names
> match their schema...
>

After addressing Shveta's comments in [1], the function is much
simpler. I also adjusted the if conditions to improve readability.
Please let me know if this looks acceptable or if you see further
opportunities for improvement.

[1] https://www.postgresql.org/message-id/CAJpy0uCFCdL97L3Pt8f586br5irqkzCa_i3tXMjH6JFCPxxr4Q%40mail.gmail.com

--
Thanks,
Nisha

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2026-07-15 17:16:26 pgstat: allow a stats kind to use its own dedicated dsa/dshash
Previous Message Nisha Moond 2026-07-15 16:48:17 Re: Support EXCEPT for TABLES IN SCHEMA publications