From a24ae3d7b9efb3b113c0d53030aa99de0d41b40a Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Thu, 25 Mar 2021 10:47:38 -0300 Subject: [PATCH] Remove StoreSingleInheritance reimplementation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- 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 8bc652ecd39..e4e1bbb7e00 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -4062,23 +4062,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; } } -- 2.39.5