diff --git a/src/backend/distributed/planner/multi_logical_planner.c b/src/backend/distributed/planner/multi_logical_planner.c index d1e2e6bca..e4141644f 100644 --- a/src/backend/distributed/planner/multi_logical_planner.c +++ b/src/backend/distributed/planner/multi_logical_planner.c @@ -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, diff --git a/src/backend/distributed/planner/shard_pruning.c b/src/backend/distributed/planner/shard_pruning.c index 7e58d1154..6408eab5d 100644 --- a/src/backend/distributed/planner/shard_pruning.c +++ b/src/backend/distributed/planner/shard_pruning.c @@ -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 diff --git a/src/include/pg_version_compat.h b/src/include/pg_version_compat.h index 03f5e202e..385aecd38 100644 --- a/src/include/pg_version_compat.h +++ b/src/include/pg_version_compat.h @@ -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( \