mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +03:00
Set relispartition correctly for index partitions
Oversight in commit 8b08f7d482: pg_class.relispartition was not
being set for index partitions, which is a bit odd, and was also causing
the code to unnecessarily call has_superclass() when simply checking the
flag was enough.
Author: Álvaro Herrera
Reported-by: Amit Langote
Discussion: https://postgr.es/m/12085bc4-0bc6-0f3a-4c43-57fe0681772b@lab.ntt.co.jp
This commit is contained in:
@@ -933,6 +933,7 @@ index_create(Relation heapRelation,
|
||||
indexRelation->rd_rel->relowner = heapRelation->rd_rel->relowner;
|
||||
indexRelation->rd_rel->relam = accessMethodObjectId;
|
||||
indexRelation->rd_rel->relhasoids = false;
|
||||
indexRelation->rd_rel->relispartition = OidIsValid(parentIndexRelid);
|
||||
|
||||
/*
|
||||
* store index's pg_class entry
|
||||
|
||||
Reference in New Issue
Block a user