X-Git-Url: http://sigaev.ru/git/gitweb.cgi?p=smlar.git;a=blobdiff_plain;f=smlar.c;h=ef89e80d959ae96d6e8ef22d4b2f976ab1bab226;hp=7b34c6ee6a615ca3528a831d01337d49ab784ac5;hb=5cb298d7226344342759d54fe32d72665315d372;hpb=fea63f13c57b9226eefa0ee0b8bd5a48a019ec90 diff --git a/smlar.c b/smlar.c index 7b34c6e..ef89e80 100644 --- a/smlar.c +++ b/smlar.c @@ -22,6 +22,12 @@ PG_MODULE_MAGIC; +#if (PG_VERSION_NUM >= 90400) +#define SNAPSHOT NULL +#else +#define SNAPSHOT SnapshotNow +#endif + static Oid getDefaultOpclass(Oid amoid, Oid typid) { @@ -40,7 +46,7 @@ getDefaultOpclass(Oid amoid, Oid typid) scan = systable_beginscan(heapRel, OpclassAmNameNspIndexId, true, - SnapshotNow, 1, &skey); + SNAPSHOT, 1, &skey); while (HeapTupleIsValid((tuple = systable_getnext(scan)))) { @@ -132,7 +138,7 @@ getAMProc(Oid amoid, Oid typid) #endif scan = systable_beginscan(heapRel, AccessMethodProcedureIndexId, true, - SnapshotNow, + SNAPSHOT, #if PG_VERSION_NUM >= 90200 4, #else