Re: Support EXCEPT for TABLES IN SCHEMA publications - Mailing list pgsql-hackers

From Nisha Moond
Subject Re: Support EXCEPT for TABLES IN SCHEMA publications
Date
Msg-id CABdArM7YU3aUKTzkLc5AZ9WxmHZHN=tjLNtKVApMj6dJt=BUpw@mail.gmail.com
Whole thread
In response to Re: Support EXCEPT for TABLES IN SCHEMA publications  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
On Wed, Jul 15, 2026 at 2:13 PM Peter Smith <smithpb2250@gmail.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



pgsql-hackers by date:

Previous
From: Nisha Moond
Date:
Subject: Re: Support EXCEPT for TABLES IN SCHEMA publications
Next
From: Sami Imseih
Date:
Subject: pgstat: allow a stats kind to use its own dedicated dsa/dshash