diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-12-27 17:39:00 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-12-27 17:39:00 +0000 |
| commit | 38e9348282e9d078487147ba8a85aebec54e3a08 (patch) | |
| tree | a893e05cad02c5e42d16aa1533fb5aa8d4cc5547 /src/include | |
| parent | c8b69ed6a892d7db5998e99b1fdae4b30d75a807 (diff) | |
| download | postgresql-38e9348282e9d078487147ba8a85aebec54e3a08.tar.gz | |
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.)
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/utils/tuplestore.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/utils/tuplestore.h b/src/include/utils/tuplestore.h index 201e8ba055..9f9981ff41 100644 --- a/src/include/utils/tuplestore.h +++ b/src/include/utils/tuplestore.h @@ -24,7 +24,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/tuplestore.h,v 1.25 2008/10/04 21:56:55 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/tuplestore.h,v 1.26 2008/12/27 17:39:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -66,6 +66,8 @@ extern void tuplestore_select_read_pointer(Tuplestorestate *state, int ptr); extern void tuplestore_copy_read_pointer(Tuplestorestate *state, int srcptr, int destptr); +extern void tuplestore_trim(Tuplestorestate *state); + extern bool tuplestore_gettupleslot(Tuplestorestate *state, bool forward, TupleTableSlot *slot); extern bool tuplestore_advance(Tuplestorestate *state, bool forward); |
