Remove StoreSingleInheritance reimplementation
I introduced this duplicate code in commit 8b08f7d4820f for no good reason. Remove it, and backpatch to 11 where it was introduced. Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
This commit is contained in:
parent
092c077c13
commit
a00c306820
@ -3579,23 +3579,7 @@ IndexSetParentIndex(Relation partitionIdx, Oid parentOid)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Datum values[Natts_pg_inherits];
|
StoreSingleInheritance(partRelid, parentOid, 1);
|
||||||
bool isnull[Natts_pg_inherits];
|
|
||||||
|
|
||||||
/*
|
|
||||||
* No pg_inherits row exists, and we want a parent for this index,
|
|
||||||
* so insert it.
|
|
||||||
*/
|
|
||||||
values[Anum_pg_inherits_inhrelid - 1] = ObjectIdGetDatum(partRelid);
|
|
||||||
values[Anum_pg_inherits_inhparent - 1] =
|
|
||||||
ObjectIdGetDatum(parentOid);
|
|
||||||
values[Anum_pg_inherits_inhseqno - 1] = Int32GetDatum(1);
|
|
||||||
memset(isnull, false, sizeof(isnull));
|
|
||||||
|
|
||||||
tuple = heap_form_tuple(RelationGetDescr(pg_inherits),
|
|
||||||
values, isnull);
|
|
||||||
CatalogTupleInsert(pg_inherits, tuple);
|
|
||||||
|
|
||||||
fix_dependencies = true;
|
fix_dependencies = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user