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

From: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: "TJ O'Donnell" <tjo(at)acm(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: plpython returns integer[] fails for multi-dimensional array
Date: 2010-12-21 23:25:48
Message-ID: AANLkTi==m0mnO2ZkRTJEbyn1h3jHLm5Wmp9_b5ePs6K_@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 21 December 2010 23:17, Thom Brown <thom(at)linux(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Satoshi Nagayasu 2010-12-21 23:31:14 Re: Understanding PG9.0 streaming replication feature
Previous Message Thom Brown 2010-12-21 23:17:25 Re: plpython returns integer[] fails for multi-dimensional array