diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-03-25 10:47:38 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-03-25 10:47:38 -0300 |
commit | 292b7d9ffa18dfdf2c90efd4f14bbd196ebad76f (patch) | |
tree | fb56b71797581091360fb5dd93024f7ceff87dc3 /src | |
parent | 73cce168ffcb1a0343cfa6fafe237f49b1449734 (diff) | |
download | postgresql-292b7d9ffa18dfdf2c90efd4f14bbd196ebad76f.tar.gz postgresql-292b7d9ffa18dfdf2c90efd4f14bbd196ebad76f.zip |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/commands/indexcmds.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index dc9112c8806..be1cf8c73d7 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -3544,23 +3544,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; } } |