projects
/
smlar.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
support 9.5
[smlar.git]
/
smlar.c
diff --git
a/smlar.c
b/smlar.c
index
84fc344
..
ef89e80
100644
(file)
--- a/
smlar.c
+++ b/
smlar.c
@@
-3,6
+3,7
@@
#include "fmgr.h"
#include "access/genam.h"
#include "access/heapam.h"
#include "fmgr.h"
#include "access/genam.h"
#include "access/heapam.h"
+#include "access/htup_details.h"
#include "access/nbtree.h"
#include "catalog/indexing.h"
#include "catalog/pg_am.h"
#include "access/nbtree.h"
#include "catalog/indexing.h"
#include "catalog/pg_am.h"
@@
-11,6
+12,7
@@
#include "catalog/pg_opclass.h"
#include "catalog/pg_type.h"
#include "executor/spi.h"
#include "catalog/pg_opclass.h"
#include "catalog/pg_type.h"
#include "executor/spi.h"
+#include "utils/catcache.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
@@
-20,6
+22,12
@@
PG_MODULE_MAGIC;
PG_MODULE_MAGIC;
+#if (PG_VERSION_NUM >= 90400)
+#define SNAPSHOT NULL
+#else
+#define SNAPSHOT SnapshotNow
+#endif
+
static Oid
getDefaultOpclass(Oid amoid, Oid typid)
{
static Oid
getDefaultOpclass(Oid amoid, Oid typid)
{
@@
-38,7
+46,7
@@
getDefaultOpclass(Oid amoid, Oid typid)
scan = systable_beginscan(heapRel,
OpclassAmNameNspIndexId, true,
scan = systable_beginscan(heapRel,
OpclassAmNameNspIndexId, true,
- S
napshotNow
, 1, &skey);
+ S
NAPSHOT
, 1, &skey);
while (HeapTupleIsValid((tuple = systable_getnext(scan))))
{
while (HeapTupleIsValid((tuple = systable_getnext(scan))))
{
@@
-130,7
+138,7
@@
getAMProc(Oid amoid, Oid typid)
#endif
scan = systable_beginscan(heapRel, AccessMethodProcedureIndexId, true,
#endif
scan = systable_beginscan(heapRel, AccessMethodProcedureIndexId, true,
- S
napshotNow
,
+ S
NAPSHOT
,
#if PG_VERSION_NUM >= 90200
4,
#else
#if PG_VERSION_NUM >= 90200
4,
#else