pgsql: Fix aboriginal mistake in plpython's set-returning-function supp

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix aboriginal mistake in plpython's set-returning-function supp
Дата
Msg-id E1PI4iW-0007Xn-Mx@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix aboriginal mistake in plpython's set-returning-function support.

We must stay in the function's SPI context until done calling the iterator
that returns the set result.  Otherwise, any attempt to invoke SPI features
in the python code called by the iterator will malfunction.  Diagnosis and
patch by Jan Urbanski, per bug report from Jean-Baptiste Quenot.

Back-patch to 8.2; there was no support for SRFs in previous versions of
plpython.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=e086197aaa8de484dafcb1cc991640980e252d70

Modified Files
--------------
src/pl/plpython/expected/plpython_setof.out |   17 ++++++++++++++++
src/pl/plpython/plpython.c                  |   28 +++++++++++++++++++-------
src/pl/plpython/sql/plpython_setof.sql      |   11 ++++++++++
3 files changed, 48 insertions(+), 8 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix aboriginal mistake in plpython's set-returning-function supp
Следующее
От: maosen@pgfoundry.org (User Maosen)
Дата:
Сообщение: pgexternaltable - src: