Skip to content

Commit 9f85784

Browse files
committed
Support multiple iterators in the Red-Black Tree implementation.
While we don't need multiple iterators at the moment, the interface is nicer and less dangerous this way. Aleksander Alekseev, with some changes by me.
1 parent 76f9dd4 commit 9f85784

File tree

4 files changed

+197
-163
lines changed

4 files changed

+197
-163
lines changed

src/backend/access/gin/ginbulk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ qsortCompareItemPointers(const void *a, const void *b)
255255
void
256256
ginBeginBAScan(BuildAccumulator *accum)
257257
{
258-
rb_begin_iterate(accum->tree, LeftRightWalk);
258+
rb_begin_iterate(accum->tree, LeftRightWalk, &accum->tree_walk);
259259
}
260260

261261
/*
@@ -271,7 +271,7 @@ ginGetBAEntry(BuildAccumulator *accum,
271271
GinEntryAccumulator *entry;
272272
ItemPointerData *list;
273273

274-
entry = (GinEntryAccumulator *) rb_iterate(accum->tree);
274+
entry = (GinEntryAccumulator *) rb_iterate(&accum->tree_walk);
275275

276276
if (entry == NULL)
277277
return NULL; /* no more entries */

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