postgres.git / summary / log / commit / refs
commit 83ba02c83e363362ff7d808085dfe236de78f61d
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Thu Mar 25 13:47:38 2021 +0000
First released in: 14.0, 11.12, 12.7, 13.3
Remove StoreSingleInheritance reimplementation
I introduced this duplicate code in commit 8b08f7d4820f for no good
reason. Remove it, and backpatch to 11 where it was introduced.
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
src/backend/commands/indexcmds.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index df962cb9383..db83d20e687 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -2664,23 +2664,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;
}
}
[parent: 09cb8512ff11]