Skip to content

Commit 292b7d9

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 73cce16 commit 292b7d9

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
@@ -3544,23 +3544,7 @@ IndexSetParentIndex(Relation partitionIdx, Oid parentOid)
35443544
}
35453545
else
35463546
{
3547-
Datum values[Natts_pg_inherits];
3548-
bool isnull[Natts_pg_inherits];
3549-
3550-
/*
3551-
* No pg_inherits row exists, and we want a parent for this index,
3552-
* so insert it.
3553-
*/
3554-
values[Anum_pg_inherits_inhrelid - 1] = ObjectIdGetDatum(partRelid);
3555-
values[Anum_pg_inherits_inhparent - 1] =
3556-
ObjectIdGetDatum(parentOid);
3557-
values[Anum_pg_inherits_inhseqno - 1] = Int32GetDatum(1);
3558-
memset(isnull, false, sizeof(isnull));
3559-
3560-
tuple = heap_form_tuple(RelationGetDescr(pg_inherits),
3561-
values, isnull);
3562-
CatalogTupleInsert(pg_inherits, tuple);
3563-
3547+
StoreSingleInheritance(partRelid, parentOid, 1);
35643548
fix_dependencies = true;
35653549
}
35663550
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy