]> granicus.if.org Git - postgresql/commit
Wrap PL/Python SPI calls into subtransactions
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 2 Feb 2011 20:06:10 +0000 (22:06 +0200)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 2 Feb 2011 20:06:10 +0000 (22:06 +0200)
commit0c5933d0104c1788479592a84cca53da357381f9
treef177882aa761e677620b820e6dbb214b5ba9e0ae
parentc73fe72e2735d20aa132640d8fab4e0eca1ced95
Wrap PL/Python SPI calls into subtransactions

This allows the language-specific try/catch construct to catch and
handle exceptions arising from SPI calls, matching the behavior of
other PLs.

As an additional bonus you no longer get all the ugly "unrecognized
error in PLy_spi_execute_query" errors.

Jan UrbaƄski, reviewed by Steve Singer
doc/src/sgml/plpython.sgml
src/pl/plpython/expected/plpython_error.out
src/pl/plpython/expected/plpython_error_0.out
src/pl/plpython/plpython.c
src/pl/plpython/sql/plpython_error.sql