• Tom Lane's avatar
    Revise tuplestore and nodeMaterial so that we don't have to read the · aa60eecc
    Tom Lane authored
    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.
    aa60eecc
tuplestore.c 20.3 KB