Skip to content

Commit 83ba02c

Browse files
committed
Remove StoreSingleInheritance reimplementation
I introduced this duplicate code in commit 8b08f7d for no good reason. Remove it, and backpatch to 11 where it was introduced. Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
1 parent 09cb851 commit 83ba02c

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/backend/commands/indexcmds.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2664,23 +2664,7 @@ IndexSetParentIndex(Relation partitionIdx, Oid parentOid)
26642664
}
26652665
else
26662666
{
2667-
Datum values[Natts_pg_inherits];
2668-
bool isnull[Natts_pg_inherits];
2669-
2670-
/*
2671-
* No pg_inherits row exists, and we want a parent for this index,
2672-
* so insert it.
2673-
*/
2674-
values[Anum_pg_inherits_inhrelid - 1] = ObjectIdGetDatum(partRelid);
2675-
values[Anum_pg_inherits_inhparent - 1] =
2676-
ObjectIdGetDatum(parentOid);
2677-
values[Anum_pg_inherits_inhseqno - 1] = Int32GetDatum(1);
2678-
memset(isnull, false, sizeof(isnull));
2679-
2680-
tuple = heap_form_tuple(RelationGetDescr(pg_inherits),
2681-
values, isnull);
2682-
CatalogTupleInsert(pg_inherits, tuple);
2683-
2667+
StoreSingleInheritance(partRelid, parentOid, 1);
26842668
fix_dependencies = true;
26852669
}
26862670
}

0 commit comments

Comments
 (0)