Skip to content

Commit a24ae3d

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 f2c7ce6 commit a24ae3d

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
@@ -4062,23 +4062,7 @@ IndexSetParentIndex(Relation partitionIdx, Oid parentOid)
40624062
}
40634063
else
40644064
{
4065-
Datum values[Natts_pg_inherits];
4066-
bool isnull[Natts_pg_inherits];
4067-
4068-
/*
4069-
* No pg_inherits row exists, and we want a parent for this index,
4070-
* so insert it.
4071-
*/
4072-
values[Anum_pg_inherits_inhrelid - 1] = ObjectIdGetDatum(partRelid);
4073-
values[Anum_pg_inherits_inhparent - 1] =
4074-
ObjectIdGetDatum(parentOid);
4075-
values[Anum_pg_inherits_inhseqno - 1] = Int32GetDatum(1);
4076-
memset(isnull, false, sizeof(isnull));
4077-
4078-
tuple = heap_form_tuple(RelationGetDescr(pg_inherits),
4079-
values, isnull);
4080-
CatalogTupleInsert(pg_inherits, tuple);
4081-
4065+
StoreSingleInheritance(partRelid, parentOid, 1);
40824066
fix_dependencies = true;
40834067
}
40844068
}

0 commit comments

Comments
 (0)