Refactor compatibility macros for PostgreSQL 18 in multi_logical_planner and shard_pruning

pull/8041/merge
Mehmet Yilmaz 2025-07-09 13:08:18 +00:00
parent 08ed6433a2
commit eabbee385a
3 changed files with 7 additions and 10 deletions

View File

@ -65,11 +65,6 @@ typedef struct QualifierWalkerContext
} QualifierWalkerContext;
#if PG_VERSION_NUM >= PG_VERSION_18
#define get_op_btree_interpretation(opno) get_op_index_interpretation(opno)
#endif
/* Function pointer type definition for apply join rule functions */
typedef MultiNode *(*RuleApplyFunction) (MultiNode *leftNode, MultiNode *rightNode,
List *partitionColumnList, JoinType joinType,

View File

@ -181,11 +181,6 @@ typedef struct PruningInstance
bool isPartial;
} PruningInstance;
#if PG_VERSION_NUM >= PG_VERSION_18
#define get_op_btree_interpretation(opno) get_op_index_interpretation(opno)
#define ROWCOMPARE_NE COMPARE_NE
#endif
/*
* Partial instances that need to be finished building. This is used to

View File

@ -29,6 +29,13 @@
(j), /* fdw_restrictinfo*/ \
(k) /* fdw_private */ \
)
/* PG-18 introduced get_op_index_interpretation, old name was get_op_btree_interpretation */
#define get_op_btree_interpretation(opno) get_op_index_interpretation(opno)
/* PG-18 unified row-compare operator codes under COMPARE_* */
#define ROWCOMPARE_NE COMPARE_NE
#elif PG_VERSION_NUM >= PG_VERSION_17
#define create_foreignscan_path_compat(a, b, c, d, e, f, g, h, i, j, k) \
create_foreignscan_path( \