Skip to content

Commit 039b495

Browse files
committed
Issue #52: Handle rbtree renames for PostgreSQL 11.0
1 parent 0af3992 commit 039b495

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/rum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ extern IndexBulkDeleteResult *rumvacuumcleanup(IndexVacuumInfo *info,
783783
extern bool rumvalidate(Oid opclassoid);
784784

785785
/* rumbulk.c */
786-
#if PG_VERSION_NUM <= 100006
786+
#if PG_VERSION_NUM <= 100006 || PG_VERSION_NUM == 110000
787787
typedef RBNode RBTNode;
788788
#endif
789789

src/rumbulk.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define DEF_NPTR 5 /* ItemPointer initial allocation quantum */
2323

2424
/* PostgreSQL pre 10 has different names for this functions */
25-
#if PG_VERSION_NUM <= 100006
25+
#if PG_VERSION_NUM <= 100006 || PG_VERSION_NUM == 110000
2626
#define rbt_create(node_size, comparator, combiner, allocfunc, freefunc, arg) \
2727
(rb_create(node_size, comparator, combiner, allocfunc, freefunc, arg))
2828
#define rbt_insert(rbt, data, isNew) \
@@ -280,7 +280,7 @@ qsortCompareRumItem(const void *a, const void *b, void *arg)
280280
void
281281
rumBeginBAScan(BuildAccumulator *accum)
282282
{
283-
#if PG_VERSION_NUM > 100006
283+
#if PG_VERSION_NUM > 100006 && PG_VERSION_NUM >= 110001
284284
rbt_begin_iterate(accum->tree, LeftRightWalk, &accum->tree_walk);
285285
#elif PG_VERSION_NUM >= 100000
286286
rb_begin_iterate(accum->tree, LeftRightWalk, &accum->tree_walk);
@@ -302,7 +302,7 @@ rumGetBAEntry(BuildAccumulator *accum,
302302
RumEntryAccumulator *entry;
303303
RumItem *list;
304304

305-
#if PG_VERSION_NUM > 100006
305+
#if PG_VERSION_NUM > 100006 && PG_VERSION_NUM >= 110001
306306
entry = (RumEntryAccumulator *) rbt_iterate(&accum->tree_walk);
307307
#elif PG_VERSION_NUM >= 100000
308308
entry = (RumEntryAccumulator *) rb_iterate(&accum->tree_walk);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy