mirror of
https://github.com/postgres/postgres.git
synced 2026-05-28 04:35:45 -04:00
Add missing Datum conversions
Similar to commit ff89e182d4, for new code added since.
This commit is contained in:
parent
5936afe1ee
commit
04f9ea372a
6 changed files with 13 additions and 13 deletions
|
|
@ -4146,7 +4146,7 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok)
|
|||
HeapTuple tuple;
|
||||
Form_pg_propgraph_label pglform;
|
||||
|
||||
tuple = SearchSysCache1(PROPGRAPHLABELOID, object->objectId);
|
||||
tuple = SearchSysCache1(PROPGRAPHLABELOID, ObjectIdGetDatum(object->objectId));
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
{
|
||||
if (!missing_ok)
|
||||
|
|
@ -4206,7 +4206,7 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok)
|
|||
HeapTuple tuple;
|
||||
Form_pg_propgraph_property pgpform;
|
||||
|
||||
tuple = SearchSysCache1(PROPGRAPHPROPOID, object->objectId);
|
||||
tuple = SearchSysCache1(PROPGRAPHPROPOID, ObjectIdGetDatum(object->objectId));
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
{
|
||||
if (!missing_ok)
|
||||
|
|
@ -6166,7 +6166,7 @@ getObjectIdentityParts(const ObjectAddress *object,
|
|||
HeapTuple tup;
|
||||
Form_pg_propgraph_element pge;
|
||||
|
||||
tup = SearchSysCache1(PROPGRAPHELOID, object->objectId);
|
||||
tup = SearchSysCache1(PROPGRAPHELOID, ObjectIdGetDatum(object->objectId));
|
||||
if (!HeapTupleIsValid(tup))
|
||||
{
|
||||
if (!missing_ok)
|
||||
|
|
@ -6189,7 +6189,7 @@ getObjectIdentityParts(const ObjectAddress *object,
|
|||
HeapTuple tup;
|
||||
Form_pg_propgraph_label pgl;
|
||||
|
||||
tup = SearchSysCache1(PROPGRAPHLABELOID, object->objectId);
|
||||
tup = SearchSysCache1(PROPGRAPHLABELOID, ObjectIdGetDatum(object->objectId));
|
||||
if (!HeapTupleIsValid(tup))
|
||||
{
|
||||
if (!missing_ok)
|
||||
|
|
@ -6211,7 +6211,7 @@ getObjectIdentityParts(const ObjectAddress *object,
|
|||
HeapTuple tup;
|
||||
Form_pg_propgraph_property pgp;
|
||||
|
||||
tup = SearchSysCache1(PROPGRAPHPROPOID, object->objectId);
|
||||
tup = SearchSysCache1(PROPGRAPHPROPOID, ObjectIdGetDatum(object->objectId));
|
||||
if (!HeapTupleIsValid(tup))
|
||||
{
|
||||
if (!missing_ok)
|
||||
|
|
|
|||
|
|
@ -699,7 +699,7 @@ UpdateDeadTupleRetentionStatus(Oid subid, bool active)
|
|||
memset(replaces, false, sizeof(replaces));
|
||||
|
||||
/* Set the subscription to disabled. */
|
||||
values[Anum_pg_subscription_subretentionactive - 1] = active;
|
||||
values[Anum_pg_subscription_subretentionactive - 1] = BoolGetDatum(active);
|
||||
replaces[Anum_pg_subscription_subretentionactive - 1] = true;
|
||||
|
||||
/* Update the catalog */
|
||||
|
|
|
|||
|
|
@ -797,7 +797,7 @@ CreateSubscription(ParseState *pstate, CreateSubscriptionStmt *stmt,
|
|||
Int32GetDatum(opts.maxretention);
|
||||
values[Anum_pg_subscription_subretentionactive - 1] =
|
||||
Int32GetDatum(opts.retaindeadtuples);
|
||||
values[Anum_pg_subscription_subserver - 1] = serverid;
|
||||
values[Anum_pg_subscription_subserver - 1] = ObjectIdGetDatum(serverid);
|
||||
if (!OidIsValid(serverid))
|
||||
values[Anum_pg_subscription_subconninfo - 1] =
|
||||
CStringGetTextDatum(conninfo);
|
||||
|
|
@ -1855,7 +1855,7 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
|
|||
walrcv_check_conninfo(conninfo,
|
||||
sub->passwordrequired && !sub->ownersuperuser);
|
||||
|
||||
values[Anum_pg_subscription_subserver - 1] = new_server->serverid;
|
||||
values[Anum_pg_subscription_subserver - 1] = ObjectIdGetDatum(new_server->serverid);
|
||||
replaces[Anum_pg_subscription_subserver - 1] = true;
|
||||
|
||||
ObjectAddressSet(referenced, ForeignServerRelationId, new_server->serverid);
|
||||
|
|
@ -1873,7 +1873,7 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
|
|||
DEPENDENCY_NORMAL,
|
||||
ForeignServerRelationId, form->subserver);
|
||||
|
||||
values[Anum_pg_subscription_subserver - 1] = InvalidOid;
|
||||
values[Anum_pg_subscription_subserver - 1] = ObjectIdGetDatum(InvalidOid);
|
||||
replaces[Anum_pg_subscription_subserver - 1] = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5062,7 +5062,7 @@ get_partition_bound_spec(Oid partOid)
|
|||
PartitionBoundSpec *boundspec = NULL;
|
||||
|
||||
/* Try fetching the tuple from the catcache, for speed. */
|
||||
tuple = SearchSysCache1(RELOID, partOid);
|
||||
tuple = SearchSysCache1(RELOID, ObjectIdGetDatum(partOid));
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
elog(ERROR, "cache lookup failed for relation %u", partOid);
|
||||
|
||||
|
|
|
|||
|
|
@ -1295,7 +1295,7 @@ DatabaseExists(Oid dboid)
|
|||
ScanKeyInit(&skey,
|
||||
Anum_pg_database_oid,
|
||||
BTEqualStrategyNumber, F_OIDEQ,
|
||||
dboid);
|
||||
ObjectIdGetDatum(dboid));
|
||||
scan = systable_beginscan(rel, DatabaseOidIndexId, true, SnapshotSelf,
|
||||
1, &skey);
|
||||
tuple = systable_getnext(scan);
|
||||
|
|
|
|||
4
src/backend/utils/cache/lsyscache.c
vendored
4
src/backend/utils/cache/lsyscache.c
vendored
|
|
@ -3941,7 +3941,7 @@ get_propgraph_label_name(Oid labeloid)
|
|||
HeapTuple tuple;
|
||||
char *labelname;
|
||||
|
||||
tuple = SearchSysCache1(PROPGRAPHLABELOID, labeloid);
|
||||
tuple = SearchSysCache1(PROPGRAPHLABELOID, ObjectIdGetDatum(labeloid));
|
||||
if (!tuple)
|
||||
{
|
||||
elog(ERROR, "cache lookup failed for label %u", labeloid);
|
||||
|
|
@ -3959,7 +3959,7 @@ get_propgraph_property_name(Oid propoid)
|
|||
HeapTuple tuple;
|
||||
char *propname;
|
||||
|
||||
tuple = SearchSysCache1(PROPGRAPHPROPOID, propoid);
|
||||
tuple = SearchSysCache1(PROPGRAPHPROPOID, ObjectIdGetDatum(propoid));
|
||||
if (!tuple)
|
||||
{
|
||||
elog(ERROR, "cache lookup failed for property %u", propoid);
|
||||
|
|
|
|||
Loading…
Reference in a new issue