Re: Python setof patch - Mailing list pgsql-patches

From Michael Fuhr
Subject Re: Python setof patch
Date
Msg-id 20050705140052.GB91794@winnie.fuhr.org
Whole thread Raw
In response to Re: Python setof patch  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Python setof patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Mon, Jul 04, 2005 at 03:04:51PM -0400, Bruce Momjian wrote:
>
> Patch applied.  Thanks.
>
> Gerrit van Dyk wrote:
> >
> > This patch allows the PL/Python module to do (SRF) functions.

Does this patch work?  The test_setof() function in sql/plpython_setof.sql
gives me the following:

SELECT * FROM test_setof();
 test_setof
------------
 1
(1 row)

If I call the function again I get this:

SELECT * FROM test_setof();
 test_setof
------------
 2
(1 row)

Calling the function a third time gives this:

SELECT * FROM test_setof();
 test_setof
------------
(0 rows)

Am I misreading the code, or shouldn't the function return two rows
on each invocation?

I don't see the setof functionality in the regression tests,
presumably because there's no expected/plpython_setof.sql file:

============== running regression test queries        ==============
test plpython_schema      ... ok
test plpython_populate    ... ok
test plpython_function    ... ok
test plpython_test        ... ok
test plpython_error       ... ok
test plpython_drop        ... ok

=====================
 All 6 tests passed.
=====================

What about documentation updates?  Still in the works?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-patches by date:

Previous
From: jtv@xs4all.nl
Date:
Subject: Error handling fix in interfaces/libpq/fe-secure.c
Next
From: Michael Fuhr
Date:
Subject: pgcrypto volatility and strictness changes