summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-11-08 07:17:55 +0100
committerPeter Eisentraut <peter@eisentraut.org>2024-11-08 07:31:48 +0100
commit38f506470f3faebb00bbb352ec2ea25d1f6c33a2 (patch)
treef472d4db0bd737d08088babcc764120a3616feae /src
parentb9d4a927d627bf5802e7e8e797ffc60d21bbac8b (diff)
Message style improvement
Backpatch the part of edee0c621de that applies to a90bdd7a44d, which was also backpatched. That way, the message is consistent in all branches.
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/tablecmds.c2
-rw-r--r--src/test/regress/expected/foreign_key.out2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 1402755c36c..2f58f869b3c 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -10402,7 +10402,7 @@ CloneFkReferencing(List **wqueue, Relation parentRel, Relation partRel)
if (fk->confrelid == RelationGetRelid(partRel))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("can't attach table \"%s\" as a partition which is referenced by foreign key \"%s\"",
+ errmsg("cannot attach table \"%s\" as a partition because it is referenced by foreign key \"%s\"",
RelationGetRelationName(partRel),
get_constraint_name(fk->conoid))));
diff --git a/src/test/regress/expected/foreign_key.out b/src/test/regress/expected/foreign_key.out
index fb9e7603eff..eac62806c1e 100644
--- a/src/test/regress/expected/foreign_key.out
+++ b/src/test/regress/expected/foreign_key.out
@@ -1972,7 +1972,7 @@ ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_2
CREATE TABLE fk_partitioned_pk_6 (a int PRIMARY KEY);
CREATE TABLE fk_partitioned_fk_6 (a int REFERENCES fk_partitioned_pk_6) PARTITION BY LIST (a);
ALTER TABLE fk_partitioned_fk_6 ATTACH PARTITION fk_partitioned_pk_6 FOR VALUES IN (1);
-ERROR: can't attach table "fk_partitioned_pk_6" as a partition which is referenced by foreign key "fk_partitioned_fk_6_a_fkey"
+ERROR: cannot attach table "fk_partitioned_pk_6" as a partition because it is referenced by foreign key "fk_partitioned_fk_6_a_fkey"
DROP TABLE fk_partitioned_pk_6, fk_partitioned_fk_6;
-- This case is similar to above, but the referenced relation is one level
-- lower in the hierarchy. This one fails in a different way as the above,