diff options
Diffstat (limited to 'src/backend/commands')
-rw-r--r-- | src/backend/commands/alter.c | 3 | ||||
-rw-r--r-- | src/backend/commands/sequence.c | 4 | ||||
-rw-r--r-- | src/backend/commands/tablecmds.c | 9 | ||||
-rw-r--r-- | src/backend/commands/user.c | 2 |
4 files changed, 10 insertions, 8 deletions
diff --git a/src/backend/commands/alter.c b/src/backend/commands/alter.c index d64929df558..ff8d003876f 100644 --- a/src/backend/commands/alter.c +++ b/src/backend/commands/alter.c @@ -295,7 +295,8 @@ AlterObjectRename_internal(Relation rel, Oid objectId, const char *new_name) } else if (classId == SubscriptionRelationId) { - if (SearchSysCacheExists2(SUBSCRIPTIONNAME, MyDatabaseId, + if (SearchSysCacheExists2(SUBSCRIPTIONNAME, + ObjectIdGetDatum(MyDatabaseId), CStringGetDatum(new_name))) report_name_conflict(classId, new_name); diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index ef014496782..fc4f77e787e 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -1718,7 +1718,7 @@ sequence_options(Oid relid) Form_pg_sequence pgsform; List *options = NIL; - pgstuple = SearchSysCache1(SEQRELID, relid); + pgstuple = SearchSysCache1(SEQRELID, ObjectIdGetDatum(relid)); if (!HeapTupleIsValid(pgstuple)) elog(ERROR, "cache lookup failed for sequence %u", relid); pgsform = (Form_pg_sequence) GETSTRUCT(pgstuple); @@ -1766,7 +1766,7 @@ pg_sequence_parameters(PG_FUNCTION_ARGS) memset(isnull, 0, sizeof(isnull)); - pgstuple = SearchSysCache1(SEQRELID, relid); + pgstuple = SearchSysCache1(SEQRELID, ObjectIdGetDatum(relid)); if (!HeapTupleIsValid(pgstuple)) elog(ERROR, "cache lookup failed for sequence %u", relid); pgsform = (Form_pg_sequence) GETSTRUCT(pgstuple); diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 4dc029f91f1..727f1517507 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -10147,7 +10147,7 @@ CloneFkReferenced(Relation parentRel, Relation partitionRel) Oid deleteTriggerOid, updateTriggerOid; - tuple = SearchSysCache1(CONSTROID, constrOid); + tuple = SearchSysCache1(CONSTROID, ObjectIdGetDatum(constrOid)); if (!HeapTupleIsValid(tuple)) elog(ERROR, "cache lookup failed for constraint %u", constrOid); constrForm = (Form_pg_constraint) GETSTRUCT(tuple); @@ -10353,7 +10353,7 @@ CloneFkReferencing(List **wqueue, Relation parentRel, Relation partRel) Oid insertTriggerOid, updateTriggerOid; - tuple = SearchSysCache1(CONSTROID, parentConstrOid); + tuple = SearchSysCache1(CONSTROID, ObjectIdGetDatum(parentConstrOid)); if (!HeapTupleIsValid(tuple)) elog(ERROR, "cache lookup failed for constraint %u", parentConstrOid); @@ -13723,7 +13723,7 @@ ATExecAlterColumnGenericOptions(Relation rel, /* First, determine FDW validator associated to the foreign table. */ ftrel = table_open(ForeignTableRelationId, AccessShareLock); - tuple = SearchSysCache1(FOREIGNTABLEREL, rel->rd_id); + tuple = SearchSysCache1(FOREIGNTABLEREL, ObjectIdGetDatum(rel->rd_id)); if (!HeapTupleIsValid(tuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), @@ -16186,7 +16186,8 @@ ATExecGenericOptions(Relation rel, List *options) ftrel = table_open(ForeignTableRelationId, RowExclusiveLock); - tuple = SearchSysCacheCopy1(FOREIGNTABLEREL, rel->rd_id); + tuple = SearchSysCacheCopy1(FOREIGNTABLEREL, + ObjectIdGetDatum(rel->rd_id)); if (!HeapTupleIsValid(tuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 6b42d4fc34a..ce77a055e58 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -1935,7 +1935,7 @@ AddRoleMems(Oid currentUserId, const char *rolename, Oid roleid, HeapTuple mrtup; Form_pg_authid mrform; - mrtup = SearchSysCache1(AUTHOID, memberid); + mrtup = SearchSysCache1(AUTHOID, ObjectIdGetDatum(memberid)); if (!HeapTupleIsValid(mrtup)) elog(ERROR, "cache lookup failed for role %u", memberid); mrform = (Form_pg_authid) GETSTRUCT(mrtup); |