#endif
#include "access/heapam.h"
#include "catalog/index.h"
+#if PG_VERSION_NUM >= 90600
+#include <catalog/pg_am.h>
+#endif
#include "miscadmin.h"
#include "storage/lmgr.h"
#include "catalog/namespace.h"
int maxlevel;
text *txt;
char *ptr;
- int len;
+ int len;
} IdxInfo;
static Relation checkOpenedRelation(Relation r, Oid PgAmOid);
static Relation
checkOpenedRelation(Relation r, Oid PgAmOid) {
- if ( r->rd_am == NULL )
+ if ( r->rd_index == NULL )
elog(ERROR, "Relation %s.%s is not an index",
get_namespace_name(RelationGetNamespace(r)),
RelationGetRelationName(r)