=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes:
> On 24/10/10 00:32, Jan UrbaÅski wrote:
>> On 21/10/10 20:48, Alvaro Herrera wrote:
>>> ... and presumably somebody can fix the real bug that Jean-Baptiste hit,
>>> too.
>> AFAICS the error comes from PLy_function_handler disconnecting from SPI
>> after
Thanks, Jan.
I tested the patch and it looks fine.
Oleg
On Sun, 14 Nov 2010, Jan Urbaski wrote:
On 24/10/10 00:32, Jan UrbaЪЪski wrote:
On 21/10/10 20:48, Alvaro Herrera wrote:
... and presumably somebody can fix the real bug that Jean-Baptiste hit,
too.
AFAICS the error comes from PLy_fun
On Sun, Oct 24, 2010 at 01:32, Jan Urbański wrote:
> The error handling in plpython is well-known to be a mess, hence the
> confusing error message that OP got. Another annoying thing is that SPI
> calls are not done in a subtransaction, which means you can't trap
> errors with a try/catch Python
On 24/10/10 00:32, Jan Urbański wrote:
> On 21/10/10 20:48, Alvaro Herrera wrote:
>> ... and presumably somebody can fix the real bug that Jean-Baptiste hit,
>> too.
>
> AFAICS the error comes from PLy_function_handler disconnecting from SPI
> after calling into the Python code and then going ahea
On 21/10/10 20:48, Alvaro Herrera wrote:
> Excerpts from Alvaro Herrera's message of jue oct 21 15:32:53 -0300 2010:
>> Excerpts from Jean-Baptiste Quenot's message of jue oct 21 09:20:16 -0300
>> 2010:
>>
>>> I get this error when calling the function:
>>>
>>> test=# select foobar();
>>> ERROR:
Excerpts from Alvaro Herrera's message of jue oct 21 15:32:53 -0300 2010:
> Excerpts from Jean-Baptiste Quenot's message of jue oct 21 09:20:16 -0300
> 2010:
>
> > I get this error when calling the function:
> >
> > test=# select foobar();
> > ERROR: error fetching next item from iterator
>
>
Excerpts from Jean-Baptiste Quenot's message of jue oct 21 09:20:16 -0300 2010:
> I get this error when calling the function:
>
> test=# select foobar();
> ERROR: error fetching next item from iterator
I can reproduce this here. The first bug to solve is, I think, getting
a more meaningful err
Hi there,
I can't make Python Generators to work reliably. According to the
documentation, this should work:
CREATE OR REPLACE FUNCTION foobar()
RETURNS SETOF text AS
$$
for s in ('Hello', 'World'):
plpy.execute('select 1')
yield s
$$
LANGUAGE 'plpythonu';
I get this error w