]> granicus.if.org Git - postgresql/commit
Handle SPIErrors raised directly in PL/Python code.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 28 Jan 2013 07:40:20 +0000 (09:40 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 28 Jan 2013 07:46:23 +0000 (09:46 +0200)
commit316186f2893d37ecd8e32392ee7c910cca9b93eb
treedcaf8ad59959e54e4049d517eba1d09c51db9fda
parent96bb29dc444f2b7fc8fbddae4fd7fe25d6544665
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.
src/pl/plpython/expected/plpython_error.out
src/pl/plpython/expected/plpython_error_0.out
src/pl/plpython/plpy_elog.c
src/pl/plpython/sql/plpython_error.sql