Preserve SQLSTATE when an SPI error is propagated through PL/python
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Preserve SQLSTATE when an SPI error is propagated through PL/python exception handler. This was a regression in 9.1, when the capability to catch specific SPI errors was added, so backpatch to 9.1. Mika Eloranta, with some editing by Jan Urbański.
Files
| Path | Change | +/− |
|---|---|---|
| src/pl/plpython/expected/plpython_error_0.out | modified | +22 −0 |
| src/pl/plpython/expected/plpython_error.out | modified | +22 −0 |
| src/pl/plpython/plpython.c | modified | +8 −6 |
| src/pl/plpython/sql/plpython_error.sql | modified | +20 −0 |