mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user