projects
/
smlar.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
v12 support
[smlar.git]
/
smlar.c
diff --git
a/smlar.c
b/smlar.c
index
13c8169
..
ce7e2ad
100644
(file)
--- a/
smlar.c
+++ b/
smlar.c
@@
-16,7
+16,9
@@
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
+#if (PG_VERSION_NUM < 120000)
#include "utils/tqual.h"
#include "utils/tqual.h"
+#endif
#include "utils/syscache.h"
#include "utils/typcache.h"
#include "utils/syscache.h"
#include "utils/typcache.h"
@@
-28,6
+30,7
@@
PG_MODULE_MAGIC;
#define SNAPSHOT SnapshotNow
#endif
#define SNAPSHOT SnapshotNow
#endif
+
static Oid
getDefaultOpclass(Oid amoid, Oid typid)
{
static Oid
getDefaultOpclass(Oid amoid, Oid typid)
{
@@
-56,7
+59,11
@@
getDefaultOpclass(Oid amoid, Oid typid)
{
if ( OidIsValid(opclassOid) )
elog(ERROR, "Ambiguous opclass for type %u (access method %u)", typid, amoid);
{
if ( OidIsValid(opclassOid) )
elog(ERROR, "Ambiguous opclass for type %u (access method %u)", typid, amoid);
+#if (PG_VERSION_NUM >= 120000)
+ opclassOid = opclass->oid;
+#else
opclassOid = HeapTupleGetOid(tuple);
opclassOid = HeapTupleGetOid(tuple);
+#endif
}
}
}
}