RE: Skipping schema changes in publication - Mailing list pgsql-hackers

From Zhijie Hou (Fujitsu)
Subject RE: Skipping schema changes in publication
Date
Msg-id TY4PR01MB169072D244423BED52C8D5B249452A@TY4PR01MB16907.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Skipping schema changes in publication  (Shlok Kyal <shlok.kyal.oss@gmail.com>)
Responses Re: Skipping schema changes in publication
List pgsql-hackers
On Saturday, March 28, 2026 4:50 AM  Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
> 
> On Fri, 27 Mar 2026 at 18:04, Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> >
> > BTW, why do we need preprocess_except_pubobj_list?
> >
> It is needed to check if the first table in the EXCEPT list is specified with TABLE
> Keyword.
> For example: create publication pub1 for all tables except (t1, t2); This should
> throw an error because t1 is specified without the TABLE keyword.
> 
> We have a similar logic for FOR TABLE or FOR TABLES IN SCHEMA
> publications in 'preprocess_pubobj_list'

The preprocess_pubobj_list function was originally introduced to handle mixed
object types (SCHEMA and TABLE) in the main list, allowing type-specific
processing per item. However, the EXCEPT clause currently only supports TABLE
objects. So strictly speaking, we don't need a similar preprocessing function
here, at least not until we support other object types in the EXCEPT clause. We
could implement the same logic directly in bison code, as shown in the attached
example.

> 
> I have attached the latest version here. I have also addressed the comment
> shared by Shveta in [1].
> [1]: https://www.postgresql.org/message-
> id/CAJpy0uCMhxUdEZMqDuSHXeAMES1gH56r-
> tkhR1J79A_f3wrLkg@mail.gmail.com

Best Regards,
Hou zj


Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: SQL Property Graph Queries (SQL/PGQ)
Next
From: John Naylor
Date:
Subject: Re: tuple radix sort