pgsql: Fix error handling in PLy_spi_execute_fetch_result().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix error handling in PLy_spi_execute_fetch_result().
Дата
Msg-id E1V0aHS-0005EA-Mi@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix error handling in PLy_spi_execute_fetch_result().

If an error is thrown out of the datatype I/O functions called by this
function, we need to do subtransaction cleanup, which the previous coding
entirely failed to do.  Fortunately, both existing callers of this function
already have proper cleanup logic, so re-throwing the exception is enough.

Also, postpone creation of the resultset tupdesc until after the I/O
conversions are complete, so that we won't leak memory in TopMemoryContext
when such an error happens.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/15b9bdf4d46e5b2858c7666dd4a39040aa12e668

Modified Files
--------------
src/pl/plpython/plpy_spi.c |   30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix error handling in PLy_spi_execute_fetch_result().
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix error handling in PLy_spi_execute_fetch_result().