get_catalog_object_by_oid requires an extra parameter in pg12

pull/2929/head
Philip Dubé 2019-09-04 17:00:58 +00:00
parent 511e715ee3
commit a28b82d67d
1 changed files with 5 additions and 0 deletions

View File

@ -94,7 +94,12 @@ ObjectExists(const ObjectAddress *address)
HeapTuple objtup;
Relation catalog = heap_open(address->classId, AccessShareLock);
#if PG_VERSION_NUM >= 120000
objtup = get_catalog_object_by_oid(catalog, get_object_attnum_oid(
address->classId), address->objectId);
#else
objtup = get_catalog_object_by_oid(catalog, address->objectId);
#endif
heap_close(catalog, AccessShareLock);
if (objtup != NULL)
{