From 3ab238d33b718ac0eda5715f437e6f9b848b7602 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Wed, 23 Mar 2016 15:54:22 +0300 Subject: [PATCH] 9.6 support --- gevel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gevel.c b/gevel.c index 7a8c891..7887114 100644 --- a/gevel.c +++ b/gevel.c @@ -18,6 +18,9 @@ #endif #include "access/heapam.h" #include "catalog/index.h" +#if PG_VERSION_NUM >= 90600 +#include +#endif #include "miscadmin.h" #include "storage/lmgr.h" #include "catalog/namespace.h" @@ -64,7 +67,7 @@ typedef struct { int maxlevel; text *txt; char *ptr; - int len; + int len; } IdxInfo; static Relation checkOpenedRelation(Relation r, Oid PgAmOid); @@ -142,7 +145,7 @@ gin_index_close(Relation rel) { 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) -- 2.37.3