mirror of
https://github.com/postgres/postgres.git
synced 2025-10-15 05:46:52 +03:00
Add missing Datum conversions
Add various missing conversions from and to Datum. The previous code mostly relied on implicit conversions or its own explicit casts instead of using the correct DatumGet*() or *GetDatum() functions. We think these omissions are harmless. Some actual bugs that were discovered during this process have been committed separately (80c758a2e1
,fd2ab03fea
). Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/8246d7ff-f4b7-4363-913e-827dadfeb145%40eisentraut.org
This commit is contained in:
2
src/backend/utils/cache/lsyscache.c
vendored
2
src/backend/utils/cache/lsyscache.c
vendored
@@ -3817,7 +3817,7 @@ get_subscription_oid(const char *subname, bool missing_ok)
|
||||
Oid oid;
|
||||
|
||||
oid = GetSysCacheOid2(SUBSCRIPTIONNAME, Anum_pg_subscription_oid,
|
||||
MyDatabaseId, CStringGetDatum(subname));
|
||||
ObjectIdGetDatum(MyDatabaseId), CStringGetDatum(subname));
|
||||
if (!OidIsValid(oid) && !missing_ok)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
|
Reference in New Issue
Block a user