Skip to content

Commit 57c8b87

Browse files
committed
Message style improvement
Backpatch the part of edee0c6 that applies to a90bdd7, which was also backpatched. That way, the message is consistent in all branches.
1 parent 6f45247 commit 57c8b87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10436,7 +10436,7 @@ CloneFkReferencing(List **wqueue, Relation parentRel, Relation partRel)
1043610436
if (fk->confrelid == RelationGetRelid(partRel))
1043710437
ereport(ERROR,
1043810438
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
10439-
errmsg("can't attach table \"%s\" as a partition which is referenced by foreign key \"%s\"",
10439+
errmsg("cannot attach table \"%s\" as a partition because it is referenced by foreign key \"%s\"",
1044010440
RelationGetRelationName(partRel),
1044110441
get_constraint_name(fk->conoid))));
1044210442

src/test/regress/expected/foreign_key.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,7 @@ ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_2
19721972
CREATE TABLE fk_partitioned_pk_6 (a int PRIMARY KEY);
19731973
CREATE TABLE fk_partitioned_fk_6 (a int REFERENCES fk_partitioned_pk_6) PARTITION BY LIST (a);
19741974
ALTER TABLE fk_partitioned_fk_6 ATTACH PARTITION fk_partitioned_pk_6 FOR VALUES IN (1);
1975-
ERROR: can't attach table "fk_partitioned_pk_6" as a partition which is referenced by foreign key "fk_partitioned_fk_6_a_fkey"
1975+
ERROR: cannot attach table "fk_partitioned_pk_6" as a partition because it is referenced by foreign key "fk_partitioned_fk_6_a_fkey"
19761976
DROP TABLE fk_partitioned_pk_6, fk_partitioned_fk_6;
19771977
-- This case is similar to above, but the referenced relation is one level
19781978
-- lower in the hierarchy. This one fails in a different way as the above,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy