Make a couple of small changes to the tuplestore API, for the benefit of the
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 27 Dec 2008 17:39:00 +0000 (17:39 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 27 Dec 2008 17:39:00 +0000 (17:39 +0000)
commit02c26f93b5daa624b69f6f628ffdbe64593a98fc
tree6cf3a66cdb05be618ddbd5a8cbc944016af37077
parentc3ba4592eac92c6a25b004d799a7c54194b0c4b1
Make a couple of small changes to the tuplestore API, for the benefit of the
upcoming window-functions patch.  First, tuplestore_trim is now an
exported function that must be explicitly invoked by callers at
appropriate times, rather than something that tuplestore tries to do
behind the scenes.  Second, a read pointer that is marked as allowing
backward scan no longer prevents truncation.  This means that a read pointer
marked as having BACKWARD but not REWIND capability can only safely read
backwards as far as the oldest other read pointer.  (The expected use pattern
for this involves having another read pointer that serves as the truncation
fencepost.)
src/backend/executor/nodeMaterial.c
src/backend/utils/sort/tuplestore.c
src/include/utils/tuplestore.h