Repair bug #2839: the various ExecReScan functions need to reset
authorTom Lane <[email protected]>
Tue, 26 Dec 2006 19:27:10 +0000 (19:27 +0000)
committerTom Lane <[email protected]>
Tue, 26 Dec 2006 19:27:10 +0000 (19:27 +0000)
commitac9880b1f9d02554018bd651ad559e18211e8bc8
tree71ce3f921db4cd996ceecf32b8b8ac28cbe7faa8
parent221df5db8852fb72e7a20b06bce6a7d7fb630ca2
Repair bug #2839: the various ExecReScan functions need to reset
ps_TupFromTlist in plan nodes that make use of it.  This was being done
correctly in join nodes and Result nodes but not in any relation-scan nodes.
Bug would lead to bogus results if a set-returning function appeared in the
targetlist of a subquery that could be rescanned after partial execution,
for example a subquery within EXISTS().  Bug has been around forever :-(
... surprising it wasn't reported before.
src/backend/executor/nodeFunctionscan.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeResult.c
src/backend/executor/nodeSeqscan.c
src/backend/executor/nodeSubqueryscan.c
src/backend/executor/nodeTidscan.c