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.
Showing
- src/pl/plpython/expected/plpython_error.out 26 additions, 0 deletionssrc/pl/plpython/expected/plpython_error.out
- src/pl/plpython/expected/plpython_error_0.out 26 additions, 0 deletionssrc/pl/plpython/expected/plpython_error_0.out
- src/pl/plpython/plpy_elog.c 37 additions, 5 deletionssrc/pl/plpython/plpy_elog.c
- src/pl/plpython/sql/plpython_error.sql 30 additions, 0 deletionssrc/pl/plpython/sql/plpython_error.sql
Loading
Please register or sign in to comment