Add support for PostgreSQL 15 (#15)

This commit is contained in:
thoshiai 2022-07-14 22:54:33 +09:00 committed by GitHub
parent d7d1fb0f49
commit 2ead2e207e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -400,8 +400,13 @@ ExecRefreshImmv(const RangeVar *relation, bool skipData,
* it against access by any other process until commit (by which time it
* will be gone).
*/
#if defined(PG_VERSION_NUM) && (PG_VERSION_NUM >= 150000)
OIDNewHeap = make_new_heap(matviewOid, tableSpace,
matviewRel->rd_rel->relam, relpersistence, ExclusiveLock);
#else
OIDNewHeap = make_new_heap(matviewOid, tableSpace,
relpersistence, ExclusiveLock);
#endif
LockRelationOid(OIDNewHeap, AccessExclusiveLock);
dest = CreateTransientRelDestReceiver(OIDNewHeap);
@ -893,8 +898,13 @@ IVM_immediate_maintenance(PG_FUNCTION_ARGS)
* it against access by any other process until commit (by which time it
* will be gone).
*/
#if defined(PG_VERSION_NUM) && (PG_VERSION_NUM >= 150000)
OIDNewHeap = make_new_heap(matviewOid, matviewRel->rd_rel->reltablespace,
matviewRel->rd_rel->relam, relpersistence, ExclusiveLock);
#else
OIDNewHeap = make_new_heap(matviewOid, matviewRel->rd_rel->reltablespace,
relpersistence, ExclusiveLock);
#endif
LockRelationOid(OIDNewHeap, AccessExclusiveLock);
dest = CreateTransientRelDestReceiver(OIDNewHeap);