diff --git a/hypopg_index.c b/hypopg_index.c index 2585a9f..79e28d0 100644 --- a/hypopg_index.c +++ b/hypopg_index.c @@ -77,6 +77,11 @@ static Oid BLOOM_AM_OID = InvalidOid; #endif +#if PG_VERSION_NUM < 180000 +#define CompareType int16 +#define COMPARE_LT BTLessStrategyNumber +#endif + /*--- Variables exported ---*/ explain_get_index_name_hook_type prev_explain_get_index_name_hook; @@ -878,11 +883,7 @@ hypo_index_store_parsetree(IndexStmt *node, const char *queryString) Oid ltopr; Oid btopfamily; Oid btopcintype; -#if PG_VERSION_NUM >= 180000 CompareType btstrategy; -#else - int16 btstrategy; -#endif ltopr = get_opfamily_member(entry->opfamily[attn], entry->opcintype[attn], @@ -894,11 +895,7 @@ hypo_index_store_parsetree(IndexStmt *node, const char *queryString) &btopcintype, &btstrategy) && btopcintype == entry->opcintype[attn] && -#if PG_VERSION_NUM >= 180000 btstrategy == COMPARE_LT -#else - btstrategy == BTLessStrategyNumber -#endif ) { /* Successful mapping */