_SPI_execute_plan failed to return result tuple table to caller in

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 1b61ee3c69ccd869bddc56ae1021797a517ca9b7
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2005-10-01T18:43:19Z
Releases: 8.1.0
_SPI_execute_plan failed to return result tuple table to caller in
the ProcessUtility case, resulting in an intratransaction memory leak
if a utility command actually did return any tuples, as reported by
Dmitry Karasik.  Fix this and also make the behavior more consistent
for cases involving nested SPI operations and multiple query trees,
by ensuring that we store the state locally until it is ready to be
returned to the caller.

Files

PathChange+/−
src/backend/executor/spi.c modified +39 −32
src/include/executor/spi_priv.h modified +4 −1