Re: PL/Python array support

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: PL/Python array support
Дата
Msg-id 1258668024.26726.16.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: PL/Python array support  (Teodor Sigaev <teodor@sigaev.ru>)
Ответы Re: PL/Python array support
Re: PL/Python array support
Список pgsql-hackers
On fre, 2009-11-13 at 18:46 +0300, Teodor Sigaev wrote:
> CREATE OR REPLACE FUNCTION incr(stuff int[]) RETURNS int[] AS $$
> for x in stuff:
>      yield x+1
> $$
> LANGUAGE 'plpythonu';
>
> # select incr(ARRAY[1,2,3]);
> ERROR:  invalid memory alloc request size 18446744073709551608
> CONTEXT:  while creating return value
> PL/Python function "incr"

Fixed with additional error check and regression test.  (The problem
could be more simply demonstrated by returning any non-sequence from the
function.)  Thanks for catching it.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Union test case broken in make check?
Следующее
От: Joachim Wieland
Дата:
Сообщение: Re: Listen / Notify - what to do when the queue is full