Fix an error when a set-returning function fails halfway through the execution

Peter Eisentraut <peter_e@gmx.net>

Commit: 88047e59ba12479ef9adcaf3dee61b48566ce6eb
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2011-01-18T21:22:37Z
Releases: 9.1.0
Fix an error when a set-returning function fails halfway through the execution

If the function using yield to return rows fails halfway, the iterator
stays open and subsequent calls to the function will resume reading
from it.  The fix is to unref the iterator and set it to NULL if there
has been an error.

Jan Urbański

Files

PathChange+/−
src/pl/plpython/plpython.c modified +8 −0