pgsql: Get rid of the global variable holding the error state

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: Get rid of the global variable holding the error state
Дата
Msg-id E1Pgjr2-0005Fw-MZ@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Get rid of the global variable holding the error state  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: More pg_test_fsync fixups.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Get rid of the global variable holding the error state