Call PLy_spi_execute_fetch_result inside the try/catch block
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 24 Jan 2011 22:43:25 +0000 (00:43 +0200)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 24 Jan 2011 22:43:25 +0000 (00:43 +0200)
commit88dcdf9007895b6703dfaf90d15244055384c603
tree9c784e15043c6ed002bee9ebba2eeb49bb32d148
parent52713d02c73926898629e349a9804cd0cae0470b
Call PLy_spi_execute_fetch_result inside the try/catch block

This way errors from fetching tuples are correctly reported as errors
in the SPI call.  While at it, avoid palloc(0).

Jan UrbaƄski
src/pl/plpython/plpython.c