Re: Bug in plpython's Python Generators

Поиск
Список
Период
Сортировка
Искать

Re: Bug in plpython's Python Generators

От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:

Re: Bug in plpython's Python Generators

От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
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
> 
> I can reproduce this here.  The first bug to solve is, I think, getting
> a more meaningful error report.

Something like this.  Somebody that really knows their way around Python
has to clean this up.

alvherre=# select * from foobar();
ERROR:  error extrayendo el próximo elemento del iterador
CONTEXTO:  falló SPI_execute: SPI_ERROR_UNCONNECTED
función PL/Python «foobar»

I think all error cases in plpython need some improvement so that they
show the error message from Python.  Right now they are ignored.

... and presumably somebody can fix the real bug that Jean-Baptiste hit,
too.

-- 
Álvaro Herrera 
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: Bug in plpython's Python Generators

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:

Re: Bug in plpython's Python Generators

От:
Jan Urbański <wulczer@wulczer.org>
Дата:

Re: Bug in plpython's Python Generators

От:
Jan Urbański <wulczer@wulczer.org>
Дата:
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 ahead and reading the
> result from the iterator.

Here's a patch with a fix for that bug.

Cheers,
Jan

Re: Bug in plpython's Python Generators

От:
Marti Raudsepp <marti@juffo.org>
Дата:

Bug in plpython's Python Generators

От:
Jean-Baptiste Quenot <jbq@caraldi.com>
Дата:

Re: Bug in plpython's Python Generators

От:
Oleg Bartunov <oleg@sai.msu.su>
Дата:
FAQ