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

From Peter Smith
Subject Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY
Date
Msg-id CAHut+PuwMhKx0PhOA4APhJTLoBGNykbeCQpr_CuwGT-SkswG5w@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>)
Responses Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY
List pgsql-hackers
Hi,

I was looking at the recently pushed code [1]. IMO the wording of some
of those new error messages of function CheckCmdReplicaIdentity() is
not quite correct.

According to my understanding, and according also to Chat-GPT:
------
The sentence "Replica identity consists of an unpublished generated
column." implies that the entire replica identity is made up of an
unpublished generated column and nothing else.

This is because the phrase "consists of" typically indicates a
complete composition, meaning that the replica identity is exclusively
composed of the unpublished generated column in this context.
------

IIUC, these errors are intended for when there is *any* unpublished
generated column found in the RI, and the RI might also have other
columns in it generated or otherwise. So, I think those error messages
saying "consists of" should be reworded like below, or similar:
* errdetail("Replica identity includes an unpublished generated column.")));
* errdetail("Replica identity has one or more unpublished generated
columns.")));
* errdetail("One or more unpublished generated columns are in the
Replica identity.")));
* ...

======
[]1 https://github.com/postgres/postgres/commit/87ce27de6963091f4a365f80bcdb06b9da098f00

Kind Regards,
Peter Smith.
Fujitsu Australia



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: [Bug] Heap Use After Free in parallel_vacuum_reset_dead_items Function
Next
From: Amit Langote
Date:
Subject: Re: generic plans and "initial" pruning