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

Appearance settings

Commit 5b1c61e

Browse filesBrowse files
committed
Add missing error code to "cannot attach index ..." error.
ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE was used in an ereport with the same message but different errdetail a few lines earlier, so use that here as well. Backpatch-through: 11
1 parent 0099db4 commit 5b1c61e
Copy full SHA for 5b1c61e

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎src/backend/commands/tablecmds.c

Copy file name to clipboardExpand all lines: src/backend/commands/tablecmds.c
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17191,7 +17191,8 @@ ATExecAttachPartitionIdx(List **wqueue, Relation parentIdx, RangeVar *name)
1719117191
}
1719217192
if (!found)
1719317193
ereport(ERROR,
17194-
(errmsg("cannot attach index \"%s\" as a partition of index \"%s\"",
17194+
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
17195+
errmsg("cannot attach index \"%s\" as a partition of index \"%s\"",
1719517196
RelationGetRelationName(partIdx),
1719617197
RelationGetRelationName(parentIdx)),
1719717198
errdetail("Index \"%s\" is not an index on any partition of table \"%s\".",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.