From a0a288a871a09f4aeef5a6708a8b4a5692ede844 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Wed, 18 Dec 2024 14:03:01 -0800 Subject: [PATCH] support build on pg11 --- ogr_fdw.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ogr_fdw.c b/ogr_fdw.c index 0b24e2c..8a081f6 100644 --- a/ogr_fdw.c +++ b/ogr_fdw.c @@ -291,9 +291,6 @@ get_extension_nsp_oid(Oid extOid) ObjectIdGetDatum(extOid)); #endif /* PG_VERSION_NUM */ - - - scandesc = systable_beginscan(rel, ExtensionOidIndexId, true, NULL, 1, entry); @@ -307,7 +304,11 @@ get_extension_nsp_oid(Oid extOid) systable_endscan(scandesc); - table_close(rel, AccessShareLock); +#if PG_VERSION_NUM < 120 + heap_close(rel, AccessShareLock); +#else + table_close(rel, AccessShareLock); +#endif return result; }