mirror of
https://github.com/postgres/postgres.git
synced 2025-08-19 23:22:23 +03:00
Improve the error message introduced in commit 87ce27de69
.
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
This commit is contained in:
@@ -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)))
|
||||
|
Reference in New Issue
Block a user