Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY
От | Amit Kapila |
---|---|
Тема | Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY |
Дата | |
Msg-id | CAA4eK1KoPDx-Q15wR5V+3fUiieBwhZr_W_zm93SRwa56ioh83Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY
|
Список | pgsql-hackers |
On Thu, Nov 7, 2024 at 11:04 AM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Wed, Nov 6, 2024 at 5:48 PM Aleksander Alekseev > <aleksander@timescale.com> wrote: > > We should fix this in the HEAD and back branches. > BTW, I was thinking as to how to fix it on back branches and it seems we should restrict to define REPLICA IDENTITY on stored generated columns in the first place in back branches as those can't be replicated. So, the following should fail: CREATE TABLE testpub_gencol (a INT, b INT GENERATED ALWAYS AS (a + 1) STORED NOT NULL); CREATE UNIQUE INDEX testpub_gencol_idx ON testpub_gencol (b); ALTER TABLE testpub_gencol REPLICA IDENTITY USING index testpub_gencol_idx; Peter, do you have an opinion on this? [1] - https://www.postgresql.org/docs/devel/ddl-generated-columns.html -- With Regards, Amit Kapila.
В списке pgsql-hackers по дате отправления: