Skip to content

Commit bc1463a

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 45e7e8c + e449d9b commit bc1463a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/backend/commands/tablecmds.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -21707,7 +21707,8 @@ refuseDupeIndexAttach(Relation parentIdx, Relation partIdx, Relation partitionTb
2170721707
errmsg("cannot attach index \"%s\" as a partition of index \"%s\"",
2170821708
RelationGetRelationName(partIdx),
2170921709
RelationGetRelationName(parentIdx)),
21710-
errdetail("Another index is already attached for partition \"%s\".",
21710+
errdetail("Another index \"%s\" is already attached for partition \"%s\".",
21711+
get_rel_name(existingIdx),
2171121712
RelationGetRelationName(partitionTbl))));
2171221713
}
2171321714

src/test/regress/expected/indexing.out

+1-1
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)