aboutsummaryrefslogtreecommitdiff
path: root/src/backend/partitioning/partdesc.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-07-20 15:18:25 +0900
committerMichael Paquier <michael@paquier.xyz>2023-07-20 15:18:25 +0900
commit2a990abd79acea4717cc8f982a28f35b6b347ddb (patch)
tree2a5b181b6d75fe5cd20367a327cd80f7e0cca868 /src/backend/partitioning/partdesc.c
parent47556a0013fa64d44add2760577d49cf2eca4cd0 (diff)
downloadpostgresql-2a990abd79acea4717cc8f982a28f35b6b347ddb.tar.gz
postgresql-2a990abd79acea4717cc8f982a28f35b6b347ddb.zip
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/ZLUhqsqQN1MOaxdw@paquier.xyz
Diffstat (limited to 'src/backend/partitioning/partdesc.c')
-rw-r--r--src/backend/partitioning/partdesc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/partitioning/partdesc.c b/src/backend/partitioning/partdesc.c
index 7a2b5e57ff4..65f3d5a5e6e 100644
--- a/src/backend/partitioning/partdesc.c
+++ b/src/backend/partitioning/partdesc.c
@@ -183,7 +183,7 @@ RelationBuildPartitionDesc(Relation rel, bool omit_detached)
PartitionBoundSpec *boundspec = NULL;
/* Try fetching the tuple from the catcache, for speed. */
- tuple = SearchSysCache1(RELOID, inhrelid);
+ tuple = SearchSysCache1(RELOID, ObjectIdGetDatum(inhrelid));
if (HeapTupleIsValid(tuple))
{
Datum datum;