aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2021-03-25 10:47:38 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2021-03-25 10:47:38 -0300
commita00c3068206e6daa236dbff0256cf3ad25ff5ed2 (patch)
tree4d321b347c6017e0702f9886dac7113dfe061068 /src/backend/commands/indexcmds.c
parent092c077c1321c259f86721ad9319fae3c90c9b8b (diff)
downloadpostgresql-a00c3068206e6daa236dbff0256cf3ad25ff5ed2.tar.gz
postgresql-a00c3068206e6daa236dbff0256cf3ad25ff5ed2.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/backend/commands/indexcmds.c')
-rw-r--r--src/backend/commands/indexcmds.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index abe0e478cf3..ca983f5e616 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -3579,23 +3579,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;
}
}