Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY
Shlok Kyal <shlok.kyal.oss@gmail.com>
From: Shlok Kyal <shlok.kyal.oss@gmail.com>
To: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>,
Amit Kapila <amit.kapila16@gmail.com>, vignesh C <vignesh21@gmail.com>
Date: 2024-11-19T07:11:46Z
Lists: pgsql-hackers
Attachments
- v9-0001-Disallow-UPDATE-DELETE-on-table-with-generated-co.patch (application/octet-stream) patch v9-0001
On Tue, 19 Nov 2024 at 09:50, Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com> wrote: > > On Tuesday, November 19, 2024 3:06 AM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote: > > > > I have fixed the comments and attached an updated patch. > > Thanks for the patch. > > I slightly refactored the codes a bit: > > * make the codes in replident_has_unpublished_gen_col() > consistent with other similar functions. > > * Avoid unnecessary operations when there are no generated columns > In the table. > > * Improve the loop by traversing the replica identity columns instead. I think > it looks clearer this way and better aligns with the purpose of the > replident_has_unpublished_gen_col function. > > * Some cosmetic changes in the comments. > > > Please check the attached diff. Feel free to merge if it looks > acceptable to you. > It looks good to me. I have added it to the latest patch. Thanks and Regards, Shlok Kyal
Commits
-
Improve the error message introduced in commit 87ce27de696.
- 2d0152d6147b 18.0 landed
-
Ensure stored generated columns must be published when required.
- 87ce27de6963 18.0 landed
-
Replicate generated columns when 'publish_generated_columns' is set.
- 7054186c4ebe 18.0 cited
-
Ignore generated columns during apply of update/delete.
- adedf54e659e 16.0 cited
-
Ignore dropped columns during apply of update/delete.
- b797def5951f 16.0 cited