This commit is contained in:
Georgy Shelkovy 2025-05-08 09:16:04 +05:00
parent 3664fc341f
commit d93592851d
No known key found for this signature in database
GPG key ID: 935940B24DB0BC77

View file

@ -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 */