diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2016-09-02 08:39:39 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2016-09-02 08:39:39 +0300 |
commit | 9f85784cae4d057f307b83b0d33edede33434f04 (patch) | |
tree | 199b29051330542df1f8e3e9353dae492798f8a2 /src/backend/access/gin/ginbulk.c | |
parent | 76f9dd4fa82270899f7b56b002b5d34226dc99d8 (diff) | |
download | postgresql-9f85784cae4d057f307b83b0d33edede33434f04.tar.gz postgresql-9f85784cae4d057f307b83b0d33edede33434f04.zip |
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.
Diffstat (limited to 'src/backend/access/gin/ginbulk.c')
-rw-r--r-- | src/backend/access/gin/ginbulk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/gin/ginbulk.c b/src/backend/access/gin/ginbulk.c index d6422ea91eb..71c64e468c9 100644 --- a/src/backend/access/gin/ginbulk.c +++ b/src/backend/access/gin/ginbulk.c @@ -255,7 +255,7 @@ qsortCompareItemPointers(const void *a, const void *b) void ginBeginBAScan(BuildAccumulator *accum) { - rb_begin_iterate(accum->tree, LeftRightWalk); + rb_begin_iterate(accum->tree, LeftRightWalk, &accum->tree_walk); } /* @@ -271,7 +271,7 @@ ginGetBAEntry(BuildAccumulator *accum, GinEntryAccumulator *entry; ItemPointerData *list; - entry = (GinEntryAccumulator *) rb_iterate(accum->tree); + entry = (GinEntryAccumulator *) rb_iterate(&accum->tree_walk); if (entry == NULL) return NULL; /* no more entries */ |