pgsql: Wrap PL/Python SPI calls into subtransactions - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Wrap PL/Python SPI calls into subtransactions
Date
Msg-id E1Pkj0q-0006vw-Is@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Wrap PL/Python SPI calls into subtransactions  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Add comment on why we're passing a useless 'false' to the plper
Next
From: Bruce Momjian
Date:
Subject: pgsql: Simplify pg_upgrade checking of executable permissions.