From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Handle SPIErrors raised directly in PL/Python code. |
Date: | 2013-01-28 07:48:32 |
Message-ID: | E1TzjSC-00021Z-LP@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2013-01-28 22:32:00 | pgsql: REASSIGN OWNED: handle shared objects, too |
Previous Message | Michael Meskes | 2013-01-27 12:53:43 | pgsql: Made ecpglib use translated messages. |