Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a00c306

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 092c077 commit a00c306

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
@@ -3579,23 +3579,7 @@ IndexSetParentIndex(Relation partitionIdx, Oid parentOid)
35793579
}
35803580
else
35813581
{
3582-
Datum values[Natts_pg_inherits];
3583-
bool isnull[Natts_pg_inherits];
3584-
3585-
/*
3586-
* No pg_inherits row exists, and we want a parent for this index,
3587-
* so insert it.
3588-
*/
3589-
values[Anum_pg_inherits_inhrelid - 1] = ObjectIdGetDatum(partRelid);
3590-
values[Anum_pg_inherits_inhparent - 1] =
3591-
ObjectIdGetDatum(parentOid);
3592-
values[Anum_pg_inherits_inhseqno - 1] = Int32GetDatum(1);
3593-
memset(isnull, false, sizeof(isnull));
3594-
3595-
tuple = heap_form_tuple(RelationGetDescr(pg_inherits),
3596-
values, isnull);
3597-
CatalogTupleInsert(pg_inherits, tuple);
3598-
3582+
StoreSingleInheritance(partRelid, parentOid, 1);
35993583
fix_dependencies = true;
36003584
}
36013585
}

0 commit comments

Comments
 (0)