22
22
#define DEF_NPTR 5 /* ItemPointer initial allocation quantum */
23
23
24
24
/* PostgreSQL pre 10 has different names for this functions */
25
- #if PG_VERSION_NUM < 100000
25
+ #if PG_VERSION_NUM <= 100006
26
26
#define rbt_create (node_size , comparator , combiner , allocfunc , freefunc , arg ) \
27
27
(rb_create(node_size, comparator, combiner, allocfunc, freefunc, arg))
28
28
#define rbt_insert (rbt , data , isNew ) \
@@ -280,8 +280,10 @@ qsortCompareRumItem(const void *a, const void *b, void *arg)
280
280
void
281
281
rumBeginBAScan (BuildAccumulator * accum )
282
282
{
283
- #if PG_VERSION_NUM >= 100000
283
+ #if PG_VERSION_NUM > 100006
284
284
rbt_begin_iterate (accum -> tree , LeftRightWalk , & accum -> tree_walk );
285
+ #elif PG_VERSION_NUM >= 100000
286
+ rb_begin_iterate (accum -> tree , LeftRightWalk , & accum -> tree_walk );
285
287
#else
286
288
rb_begin_iterate (accum -> tree , LeftRightWalk );
287
289
#endif
@@ -300,8 +302,10 @@ rumGetBAEntry(BuildAccumulator *accum,
300
302
RumEntryAccumulator * entry ;
301
303
RumItem * list ;
302
304
303
- #if PG_VERSION_NUM >= 100000
305
+ #if PG_VERSION_NUM > 100006
304
306
entry = (RumEntryAccumulator * ) rbt_iterate (& accum -> tree_walk );
307
+ #elif PG_VERSION_NUM >= 100000
308
+ entry = (RumEntryAccumulator * ) rb_iterate (& accum -> tree_walk );
305
309
#else
306
310
entry = (RumEntryAccumulator * ) rb_iterate (accum -> tree );
307
311
#endif
0 commit comments