mirror of
https://github.com/HypoPG/hypopg
synced 2026-05-23 17:18:44 +00:00
Fix compatibility with pg18 (#96)
Upstream commit postgres/postgres@a8025f5 changed last argument of get_ordering_op_properties() from pointer to int16 to pointer to CompareType.
This commit is contained in:
parent
63ad788b48
commit
d22b85aa43
1 changed files with 7 additions and 2 deletions
|
|
@ -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,7 +883,7 @@ hypo_index_store_parsetree(IndexStmt *node, const char *queryString)
|
|||
Oid ltopr;
|
||||
Oid btopfamily;
|
||||
Oid btopcintype;
|
||||
int16 btstrategy;
|
||||
CompareType btstrategy;
|
||||
|
||||
ltopr = get_opfamily_member(entry->opfamily[attn],
|
||||
entry->opcintype[attn],
|
||||
|
|
@ -890,7 +895,7 @@ hypo_index_store_parsetree(IndexStmt *node, const char *queryString)
|
|||
&btopcintype,
|
||||
&btstrategy) &&
|
||||
btopcintype == entry->opcintype[attn] &&
|
||||
btstrategy == BTLessStrategyNumber)
|
||||
btstrategy == COMPARE_LT)
|
||||
{
|
||||
/* Successful mapping */
|
||||
entry->sortopfamily[attn] = btopfamily;
|
||||
|
|
|
|||
Loading…
Reference in a new issue