mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Message style improvement
Backpatch the part ofedee0c621dthat applies toa90bdd7a44, which was also backpatched. That way, the message is consistent in all branches.
This commit is contained in:
		@@ -10402,7 +10402,7 @@ CloneFkReferencing(List **wqueue, Relation parentRel, Relation partRel)
 | 
				
			|||||||
		if (fk->confrelid == RelationGetRelid(partRel))
 | 
							if (fk->confrelid == RelationGetRelid(partRel))
 | 
				
			||||||
			ereport(ERROR,
 | 
								ereport(ERROR,
 | 
				
			||||||
					(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
 | 
										(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),
 | 
												RelationGetRelationName(partRel),
 | 
				
			||||||
							get_constraint_name(fk->conoid))));
 | 
												get_constraint_name(fk->conoid))));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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_pk_6 (a int PRIMARY KEY);
 | 
				
			||||||
CREATE TABLE fk_partitioned_fk_6 (a int REFERENCES fk_partitioned_pk_6) PARTITION BY LIST (a);
 | 
					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);
 | 
					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;
 | 
					DROP TABLE fk_partitioned_pk_6, fk_partitioned_fk_6;
 | 
				
			||||||
-- This case is similar to above, but the referenced relation is one level
 | 
					-- 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,
 | 
					-- lower in the hierarchy.  This one fails in a different way as the above,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user