We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcdef9d commit 442e12dCopy full SHA for 442e12d
crossmatch.c
@@ -34,6 +34,9 @@
34
#if PG_VERSION_NUM >= 90300
35
#include "access/htup_details.h"
36
#endif
37
+#if PG_VERSION_NUM >= 90600
38
+#include "catalog/pg_am.h"
39
+#endif
40
#include "catalog/namespace.h"
41
#include "funcapi.h"
42
#include "nodes/pg_list.h"
@@ -106,7 +109,11 @@ PG_FUNCTION_INFO_V1(crossmatch);
106
109
static Relation
107
110
checkOpenedRelation(Relation r, Oid PgAmOid)
108
111
{
112
113
+ if (r->rd_amroutine == NULL)
114
+#else
115
if (r->rd_am == NULL)
116
117
elog(ERROR, "Relation %s.%s is not an index",
118
get_namespace_name(RelationGetNamespace(r)),
119
RelationGetRelationName(r));
0 commit comments