Skip to content

Commit 442e12d

Browse files
committed
ported to 9.6devel
1 parent bcdef9d commit 442e12d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crossmatch.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
#if PG_VERSION_NUM >= 90300
3535
#include "access/htup_details.h"
3636
#endif
37+
#if PG_VERSION_NUM >= 90600
38+
#include "catalog/pg_am.h"
39+
#endif
3740
#include "catalog/namespace.h"
3841
#include "funcapi.h"
3942
#include "nodes/pg_list.h"
@@ -106,7 +109,11 @@ PG_FUNCTION_INFO_V1(crossmatch);
106109
static Relation
107110
checkOpenedRelation(Relation r, Oid PgAmOid)
108111
{
112+
#if PG_VERSION_NUM >= 90600
113+
if (r->rd_amroutine == NULL)
114+
#else
109115
if (r->rd_am == NULL)
116+
#endif
110117
elog(ERROR, "Relation %s.%s is not an index",
111118
get_namespace_name(RelationGetNamespace(r)),
112119
RelationGetRelationName(r));

0 commit comments

Comments
 (0)