Preserve SQLSTATE when an SPI error is propagated through PL/python
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 24 Nov 2011 15:18:43 +0000 (17:18 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 24 Nov 2011 15:18:43 +0000 (17:18 +0200)
commitf21fc7f9fc63ff86d7d77d352ae274b6e2b6e09e
tree04b60697b3d4cb694b544dca4a008d3f687c337f
parent5df1403b0f2b44235c8f401bd49dab9a8cf6bf90
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.
src/pl/plpython/expected/plpython_error.out
src/pl/plpython/expected/plpython_error_0.out
src/pl/plpython/plpython.c
src/pl/plpython/sql/plpython_error.sql