Commit a24ae3d7 authored by Alvaro Herrera's avatar Alvaro Herrera

Remove StoreSingleInheritance reimplementation

I introduced this duplicate code in commit 8b08f7d4 for no good
reason.  Remove it, and backpatch to 11 where it was introduced.

Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
parent f2c7ce64
......@@ -4062,23 +4062,7 @@ IndexSetParentIndex(Relation partitionIdx, Oid parentOid)
}
else
{
Datum values[Natts_pg_inherits];
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);
StoreSingleInheritance(partRelid, parentOid, 1);
fix_dependencies = true;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment