X-Git-Url: http://www.sigaev.ru/git/gitweb.cgi?p=gevel.git;a=blobdiff_plain;f=gevel.c;h=86fb43e6e742b9714dcaaf9c9496c8cd508ee80a;hp=269ece9def91c7e30e23f2c42af0a26e23d51656;hb=58b7ad96a866faa048754492bd269fe41c46436f;hpb=29d6954b1ac25b2b5304ee5559fbf309f7f869c6 diff --git a/gevel.c b/gevel.c index 269ece9..86fb43e 100644 --- a/gevel.c +++ b/gevel.c @@ -58,7 +58,11 @@ PG_MODULE_MAGIC; static Relation gist_index_open(RangeVar *relvar) { +#if PG_VERSION_NUM < 90100 Oid relOid = RangeVarGetRelid(relvar, false); +#else + Oid relOid = RangeVarGetRelid(relvar, NoLock, false); +#endif return checkOpenedRelation( index_open(relOid, AccessExclusiveLock), GIST_AM_OID); } @@ -67,7 +71,11 @@ gist_index_open(RangeVar *relvar) { static Relation gin_index_open(RangeVar *relvar) { +#if PG_VERSION_NUM < 90100 Oid relOid = RangeVarGetRelid(relvar, false); +#else + Oid relOid = RangeVarGetRelid(relvar, NoLock, false); +#endif return checkOpenedRelation( index_open(relOid, AccessShareLock), GIN_AM_OID); }