Re: plpython array support

From: Stuart Bishop <stuart(at)stuartbishop(dot)net>
To: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
Cc: Jorge Godoy <jgodoy(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: plpython array support
Date: 2007-11-23 12:47:17
Message-ID: 4746CBD5.3000809@stuartbishop.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sean Davis wrote:
> On Nov 19, 2007 9:08 PM, Jorge Godoy <jgodoy(at)gmail(dot)com> wrote:
>> Em Monday 19 November 2007 19:29:51 Sean Davis escreveu:
>>> Just a simple question--does plpythonu (8.3beta) have support for
>>> arrays? I don't see a specific mention of it in the docs, so I
>>> suppose not.
>> Arrays work for a long time now. I've been using them since 8.1, for sure,
>> but I think that on 7.4 I already had code with arrays inside the database...
>
> Thanks, Jorge. I know that postgresql supports arrays, but I still
> don't see how plpython supports arrays. I noticed this post:
>
> http://archives.postgresql.org/pgsql-general/2007-01/msg01417.php
>
> from January, 2007 that suggests how to use the string representation
> of an array to convert to/from python arrays. This will work, but I
> was wondering if there is now a true conversion from postgresql arrays
> to python and vice-versa.

With 8.2, no there is not. Beyond the simple number and string times
everything gets cast to a string (arrays, tsvectors, etc.). I have no idea
if anyone is working on this for 8.3 or later.

--
Stuart Bishop <stuart(at)stuartbishop(dot)net>
http://www.stuartbishop.net/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stuart Bishop 2007-11-23 12:51:05 Re: Compressed Backup too big
Previous Message Thomas Chille 2007-11-23 12:43:36 Re: autovacuum process blocks without reporting a deadlock