summaryrefslogtreecommitdiff
path: root/src/pl/plpython/sql/plpython_setof.sql
Commit message (Collapse)AuthorAgeFilesLines
* PL/Python: Fix crash in functions returning SETOF and using SPIPeter Eisentraut2012-05-021-0/+12
| | | | | | | | | | | | Allocate PLyResultObject.tupdesc in TopMemoryContext, because its lifetime is the lifetime of the Python object and it shouldn't be freed by some other memory context, such as one controlled by SPI. We trust that the Python object will clean up its own memory. Before, this would crash the included regression test case by trying to use memory that was already freed. reported by Asif Naeem, analysis by Tom Lane
* Fix aboriginal mistake in plpython's set-returning-function support.Tom Lane2010-11-151-0/+11
| | | | | | | | | | 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.
* Make PL/Python tests more compatible with Python 3Peter Eisentraut2009-08-241-1/+1
| | | | | | This changes a bunch of incidentially used constructs in the PL/Python regression tests to equivalent constructs in cases where Python 3 no longer supports the old syntax. Support for older Python versions is unchanged.
* Augment test coverage in PL/Python, especially for error conditions.Peter Eisentraut2009-08-131-0/+7
|
* Split the plpython regression test into test cases arranged by topic, insteadPeter Eisentraut2009-08-121-0/+46
| | | | | | of the previous monolithic setup-create-run sequence, that was apparently inherited from a previous test infrastructure, but makes working with the tests and adding new ones weird.
* Back out patch. This should be done like other server-side languages.Bruce Momjian2005-07-051-12/+0
| | | | | | | | | | | | | | | | | --------------------------------------------------------------------------- This patch allows the PL/Python module to do (SRF) functions. The patch was taken from the CVS version. I have modified the plpython.c file and have added a test sql script for testing the functionality. It was actually the script that was in the 8.0.3 version but have since been removed. In order to signal the end of a set, the called python function must simply return plpy.EndOfSet and the set would be returned. Gerrit van Dyk
* This patch allows the PL/Python module to do (SRF) functions.Bruce Momjian2005-07-041-0/+12
The patch was taken from the CVS version. I have modified the plpython.c file and have added a test sql script for testing the functionality. It was actually the script that was in the 8.0.3 version but have since been removed. In order to signal the end of a set, the called python function must simply return plpy.EndOfSet and the set would be returned. Gerrit van Dyk