RE: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
From: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
To: Shlok Kyal <shlok.kyal.oss@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, Amit Kapila <amit.kapila16@gmail.com>, vignesh C <vignesh21@gmail.com>
Date: 2024-11-19T04:20:08Z
Lists: pgsql-hackers
Attachments
- v2-0001-improve-logic.patch.txt (text/plain)
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. Best Regards, Hou zj
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