Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7b00994

Browse files
committed
Add missing error code to "cannot attach index ..." error.
ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE was used in an ereport with thesame message but different errdetail a few lines earlier, so use thathere as well.Backpatch-through: 11
1 parent169a658 commit7b00994

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/commands/tablecmds.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16832,7 +16832,8 @@ ATExecAttachPartitionIdx(List **wqueue, Relation parentIdx, RangeVar *name)
1683216832
}
1683316833
if (!found)
1683416834
ereport(ERROR,
16835-
(errmsg("cannot attach index \"%s\" as a partition of index \"%s\"",
16835+
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
16836+
errmsg("cannot attach index \"%s\" as a partition of index \"%s\"",
1683616837
RelationGetRelationName(partIdx),
1683716838
RelationGetRelationName(parentIdx)),
1683816839
errdetail("Index \"%s\" is not an index on any partition of table \"%s\".",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp