From: Teodor Sigaev Date: Wed, 23 Mar 2016 12:54:22 +0000 (+0300) Subject: 9.6 support X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=3ab238d33b718ac0eda5715f437e6f9b848b7602;p=gevel.git 9.6 support --- 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)