Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 899687f

Browse files
author
Commitfest Bot
committed
[CF 5700] v1 - minor error message enhancement in refuseDupeIndexAttach
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5700 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CACJufxGBfykJ_1ztk9T+L_gLmkOSOF+mL9Mn4ZPydz-rh=LccQ@mail.gmail.com Author(s): Jian He
2 parents e050af2 + 83d0e2a commit 899687f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/backend/commands/tablecmds.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21702,7 +21702,8 @@ refuseDupeIndexAttach(Relation parentIdx, Relation partIdx, Relation partitionTb
2170221702
errmsg("cannot attach index \"%s\" as a partition of index \"%s\"",
2170321703
RelationGetRelationName(partIdx),
2170421704
RelationGetRelationName(parentIdx)),
21705-
errdetail("Another index is already attached for partition \"%s\".",
21705+
errdetail("Another index \"%s\" is already attached for partition \"%s\".",
21706+
get_rel_name(existingIdx),
2170621707
RelationGetRelationName(partitionTbl))));
2170721708
}
2170821709

src/test/regress/expected/indexing.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ alter index idxpart_a_b_idx attach partition idxpart1_a_b_idx; -- quiet
248248
create index idxpart1_2_a_b on idxpart1 (a, b);
249249
alter index idxpart_a_b_idx attach partition idxpart1_2_a_b;
250250
ERROR: cannot attach index "idxpart1_2_a_b" as a partition of index "idxpart_a_b_idx"
251-
DETAIL: Another index is already attached for partition "idxpart1".
251+
DETAIL: Another index "idxpart1_a_b_idx" is already attached for partition "idxpart1".
252252
drop table idxpart;
253253
-- make sure everything's gone
254254
select indexrelid::regclass, indrelid::regclass

0 commit comments

Comments
 (0)