Get rid of the global variable holding the error state Global error handling led to confusion and was hard to manage. With this change, errors from PostgreSQL are immediately reported to Python as exceptions. This requires setting a Python exception after reporting the caught PostgreSQL error as a warning, because PLy_elog destroys the Python exception state.
Ideally, all places where PostgreSQL errors need to be reported back to Python should be wrapped in subtransactions, to make going back to Python from a longjmp safe. This will be handled in a separate patch. Jan UrbaĆski Branch ------ master Details ------- http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=116ce2f4d01b929cc7c3bd0f7e6bca631f83da50 Modified Files -------------- src/pl/plpython/expected/plpython_error.out | 15 ++- src/pl/plpython/expected/plpython_test.out | 2 +- src/pl/plpython/plpython.c | 171 ++++++++++++++++----------- 3 files changed, 114 insertions(+), 74 deletions(-) -- Sent via pgsql-committers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
