summaryrefslogtreecommitdiff
path: root/src/backend/catalog/index.c
diff options
context:
space:
mode:
authorMichael Paquier2023-07-20 06:18:25 +0000
committerMichael Paquier2023-07-20 06:18:25 +0000
commit2a990abd79acea4717cc8f982a28f35b6b347ddb (patch)
tree2a5b181b6d75fe5cd20367a327cd80f7e0cca868 /src/backend/catalog/index.c
parent47556a0013fa64d44add2760577d49cf2eca4cd0 (diff)
Add missing ObjectIdGetDatum() in syscache lookup calls for Oids
Based on how postgres.h foes the Oid <-> Datum conversion, there is no existing bugs but let's be consistent. 17 spots have been noticed as incorrectly passing down Oids rather than Datums. Aleksander got one, Zhang two and I the rest. Author: Michael Paquier, Aleksander Alekseev, Zhang Mingli Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/catalog/index.c')
-rw-r--r--src/backend/catalog/index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 67b743e2514..eb2b8d84c33 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -1330,7 +1330,7 @@ index_concurrently_create_copy(Relation heapRelation, Oid oldIndexId,
indcoloptions = (int2vector *) DatumGetPointer(colOptionDatum);
/* Fetch options of index if any */
- classTuple = SearchSysCache1(RELOID, oldIndexId);
+ classTuple = SearchSysCache1(RELOID, ObjectIdGetDatum(oldIndexId));
if (!HeapTupleIsValid(classTuple))
elog(ERROR, "cache lookup failed for relation %u", oldIndexId);
optionDatum = SysCacheGetAttr(RELOID, classTuple,