mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 02:01:16 +02:00
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
This commit is contained in:
parent
25fc24ba90
commit
34301c9c56
@ -15977,7 +15977,8 @@ ATExecAttachPartitionIdx(List **wqueue, Relation parentIdx, RangeVar *name)
|
||||
}
|
||||
if (!found)
|
||||
ereport(ERROR,
|
||||
(errmsg("cannot attach index \"%s\" as a partition of index \"%s\"",
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
errmsg("cannot attach index \"%s\" as a partition of index \"%s\"",
|
||||
RelationGetRelationName(partIdx),
|
||||
RelationGetRelationName(parentIdx)),
|
||||
errdetail("Index \"%s\" is not an index on any partition of table \"%s\".",
|
||||
|
Loading…
Reference in New Issue
Block a user