pgsql: Handle SPIErrors raised directly in PL/Python code. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Handle SPIErrors raised directly in PL/Python code.
Date
Msg-id E1TzjSC-00021Z-LP@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Handle SPIErrors raised directly in PL/Python code.

If a PL/Python function raises an SPIError (or one if its subclasses)
directly with python's raise statement, treat it the same as an SPIError
generated internally. In particular, if the user sets the sqlstate
attribute, preserve that.

Oskari Saarenmaa and Jan Urbański, reviewed by Karl O. Pinc.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/316186f2893d37ecd8e32392ee7c910cca9b93eb

Modified Files
--------------
src/pl/plpython/expected/plpython_error.out   |   26 +++++++++++++++
src/pl/plpython/expected/plpython_error_0.out |   26 +++++++++++++++
src/pl/plpython/plpy_elog.c                   |   42 ++++++++++++++++++++++---
src/pl/plpython/sql/plpython_error.sql        |   30 +++++++++++++++++
4 files changed, 119 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Michael Meskes
Date:
Subject: pgsql: Made ecpglib use translated messages.
Next
From: Alvaro Herrera
Date:
Subject: pgsql: DROP OWNED: don't try to drop tablespaces/databases