diff options
author | Amit Kapila <akapila@postgresql.org> | 2024-12-09 09:11:45 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2024-12-09 09:11:45 +0530 |
commit | 2d0152d6147bb7d12eb120b7e749a323bf91aa6e (patch) | |
tree | 140f898479feb4b882113e95264005dcc29ef3de /src/backend/executor | |
parent | da99fedf8c1726326868d37a0e886caf9107d040 (diff) | |
download | postgresql-2d0152d6147bb7d12eb120b7e749a323bf91aa6e.tar.gz postgresql-2d0152d6147bb7d12eb120b7e749a323bf91aa6e.zip |
Improve the error message introduced in commit 87ce27de696.
The error detail message "Replica identity consists of an unpublished
generated column." implies that the entire replica identity is made up of
an unpublished generated column which may not be the case.
Reported-by: Peter Smith
Author: Shlok Kyal
Reviewed-by: Peter Smith, Amit Kapila
Discussion: https://postgr.es/m/CAHut+PuwMhKx0PhOA4APhJTLoBGNykbeCQpr_CuwGT-SkswG5w@mail.gmail.com
Diffstat (limited to 'src/backend/executor')
-rw-r--r-- | src/backend/executor/execReplication.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/executor/execReplication.c b/src/backend/executor/execReplication.c index cfdf2eedf4d..368a40337aa 100644 --- a/src/backend/executor/execReplication.c +++ b/src/backend/executor/execReplication.c @@ -825,7 +825,7 @@ CheckCmdReplicaIdentity(Relation rel, CmdType cmd) (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), errmsg("cannot update table \"%s\"", RelationGetRelationName(rel)), - errdetail("Replica identity consists of an unpublished generated column."))); + errdetail("Replica identity must not contain unpublished generated columns."))); else if (cmd == CMD_DELETE && !pubdesc.rf_valid_for_delete) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), @@ -843,7 +843,7 @@ CheckCmdReplicaIdentity(Relation rel, CmdType cmd) (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), errmsg("cannot delete from table \"%s\"", RelationGetRelationName(rel)), - errdetail("Replica identity consists of an unpublished generated column."))); + errdetail("Replica identity must not contain unpublished generated columns."))); /* If relation has replica identity we are always good. */ if (OidIsValid(RelationGetReplicaIndex(rel))) |