Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+2-2
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)