summaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-12-19 07:55:58 +0900
committerMichael Paquier <michael@paquier.xyz>2025-12-19 07:55:58 +0900
commit9d0f7996e58c2a92efe06c901c6dfe1f6ced0a1d (patch)
tree546a3587185dd76ac90be9c30b8cbbd4e341cf41 /src/backend/parser
parentd49936f3028b0bb6ac8ff83e07e421ca2a4f5c3f (diff)
Use table/index_close() more consistently
All the code paths updated here have been using relation_close() to close a relation that has already been opened with table_open() or index_open(), where a relkind check is enforced. table_close() and index_open() do the same thing as relation_close(), so there was no harm, but being inconsistent could lead to issues if the internals of these close() functions begin to introduce some logic specific to each relkind in the future. Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://postgr.es/m/aUKamYGiDKO6byp5@ip-10-97-1-34.eu-west-3.compute.internal
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/parse_utilcmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 375b40b29af..2b7b084f216 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -2572,7 +2572,7 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt)
}
/* Close the index relation but keep the lock */
- relation_close(index_rel, NoLock);
+ index_close(index_rel, NoLock);
index->indexOid = index_oid;
}