Pass EXEC_FLAG_REWIND when initializing a tuplestore scan.
Since a rescan is possible, we must be able to rewind. Thomas Munro, per a report from Prabhat Sabu Discussion: http://postgr.es/m/CAEepm=2=Uv5fm=exqL+ygBxaO+-tgmC=o+63H4zYAXi9HtXf1w@mail.gmail.com
This commit is contained in:
parent
3439f84475
commit
304007d9f1
@ -107,7 +107,7 @@ ExecInitNamedTuplestoreScan(NamedTuplestoreScan *node, EState *estate, int eflag
|
||||
scanstate->relation = (Tuplestorestate *) enr->reldata;
|
||||
scanstate->tupdesc = ENRMetadataGetTupDesc(&(enr->md));
|
||||
scanstate->readptr =
|
||||
tuplestore_alloc_read_pointer(scanstate->relation, 0);
|
||||
tuplestore_alloc_read_pointer(scanstate->relation, EXEC_FLAG_REWIND);
|
||||
|
||||
/*
|
||||
* The new read pointer copies its position from read pointer 0, which
|
||||
|
Loading…
x
Reference in New Issue
Block a user