Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY
Date
Msg-id CAA4eK1J0WG3fTL3ntzukWM-6FouoZ5gE+7TiSMvfPZ4sUmNxyA@mail.gmail.com
Whole thread Raw
In response to Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Thu, Nov 21, 2024 at 5:30 PM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
>

Review comments:
===============
1.
+
+ /*
+ * true if all generated columns which are part of replica identity are
+ * published or the publication actions do not include UPDATE or DELETE.
+ */
+ bool replident_valid_for_update;
+ bool replident_valid_for_delete;

These are too generic names for the purpose they are used. How about
instead name them as gencols_valid_for_update and
gencols_valid_for_delete?

2. The comments atop RelationBuildPublicationDesc() is only about row
filter. We should update it for column list and generated columns as
well.

3. It is better to merge the functionality of the invalid column list
and unpublished generated columns as proposed by Hou-San above.



--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Junwang Zhao
Date:
Subject: Re: Make COPY format extendable: Extract COPY TO format implementations
Next
From: Ashutosh Bapat
Date:
Subject: Re: [Feature Request] Schema Aliases and Versioned Schemas