Skip to content

Commit 304007d

Browse files
committed
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
1 parent 3439f84 commit 304007d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/executor/nodeNamedtuplestorescan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ ExecInitNamedTuplestoreScan(NamedTuplestoreScan *node, EState *estate, int eflag
107107
scanstate->relation = (Tuplestorestate *) enr->reldata;
108108
scanstate->tupdesc = ENRMetadataGetTupDesc(&(enr->md));
109109
scanstate->readptr =
110-
tuplestore_alloc_read_pointer(scanstate->relation, 0);
110+
tuplestore_alloc_read_pointer(scanstate->relation, EXEC_FLAG_REWIND);
111111

112112
/*
113113
* The new read pointer copies its position from read pointer 0, which

0 commit comments

Comments
 (0)