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

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=0c5933d0104c1788479592a84cca53da357381f9

Modified Files
--------------
doc/src/sgml/plpython.sgml                    |   30 ++++++
src/pl/plpython/expected/plpython_error.out   |   32 +++++--
src/pl/plpython/expected/plpython_error_0.out |   32 +++++--
src/pl/plpython/plpython.c                    |  118 ++++++++++++++++++++++---
src/pl/plpython/sql/plpython_error.sql        |   22 +++++
5 files changed, 202 insertions(+), 32 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to