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(-) -- Sent via pgsql-committers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
