Revise tuplestore and nodeMaterial so that we don't have to read the
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 9 Mar 2003 02:19:13 +0000 (02:19 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 9 Mar 2003 02:19:13 +0000 (02:19 +0000)
commitaa60eecc37c1bbb934079bf5234fba3e3879873d
treedbfca43657ff1e4cc3da2d4f907c73d289cfe213
parent05a966fca4a828413da9d3a9d9492d111e176780
Revise tuplestore and nodeMaterial so that we don't have to read the
entire contents of the subplan into the tuplestore before we can return
any tuples.  Instead, the tuplestore holds what we've already read, and
we fetch additional rows from the subplan as needed.  Random access to
the previously-read rows works with the tuplestore, and doesn't affect
the state of the partially-read subplan.  This is a step towards fixing
the problems with cursors over complex queries --- we don't want to
stick in Materialize nodes if they'll prevent quick startup for a cursor.
contrib/tablefunc/tablefunc.c
src/backend/executor/execQual.c
src/backend/executor/nodeMaterial.c
src/backend/utils/sort/tuplestore.c
src/include/nodes/execnodes.h
src/include/utils/tuplestore.h
src/pl/plpgsql/src/pl_exec.c