Re: plpython returns integer[] fails for multi-dimensional array

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: plpython returns integer[] fails for multi-dimensional array
Дата
Msg-id 201012211602.22492.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на Re: plpython returns integer[] fails for multi-dimensional array  (Peter Geoghegan <peter.geoghegan86@gmail.com>)
Ответы Re: plpython returns integer[] fails for multi-dimensional array  ("TJ O'Donnell" <tjo@acm.org>)
Список pgsql-general
On Tuesday 21 December 2010 3:25:48 pm Peter Geoghegan wrote:
> On 21 December 2010 23:17, Thom Brown <thom@linux.com> wrote:
> > Are you sure that "a" returns okay in that scenario.  You're using a
> > list.  Shouldn't you be using an array?  Like: a = []
>
> a =[] actually declares an empty list in Python. You can return a list
> or a tuple from a pl/python function in 9.0 and it will be interpreted
> as an array at the SQL call site. You cannot in prior versions.
>
> --
> Regards,
> Peter Geoghegan

Digging into the source for plpython seems to show it only supports one
dimensional arrays. When I tried my previous example on a 9.0.1 instance it
kept changing integer[][] to integer[].

--
Adrian Klaver
adrian.klaver@gmail.com

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: libpq sendQuery -- getResult not returning until all queries complete
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: libpq sendQuery -- getResult not returning until all queries complete