Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix aboriginal mistake in plpython's set-returning-functionsupp
Date: 2010-11-15 19:27:52
Message-ID: (view raw or whole thread)
Lists: 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



Modified Files
src/pl/plpython/expected/plpython_function.out |    8 ++++++
src/pl/plpython/expected/plpython_test.out     |    9 +++++++
src/pl/plpython/plpython.c                     |   28 +++++++++++++++++------
src/pl/plpython/sql/plpython_function.sql      |    9 +++++++
src/pl/plpython/sql/plpython_test.sql          |    2 +
5 files changed, 48 insertions(+), 8 deletions(-)

pgsql-committers by date

Next:From: Peter EisentrautDate: 2010-11-15 21:10:20
Subject: Re: [COMMITTERS] pgsql: Improved parallel make support
Previous:From: User AndrewdDate: 2010-11-15 17:51:29
Subject: pgbuildfarm - client-code: Call directly.

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group