Lists: | pgsql-bugs |
---|
From: | "Jason" <jason(at)beanfield(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #5171: Composite type with array does not translate in plpythonu |
Date: | 2009-11-06 17:29:34 |
Message-ID: | 200911061729.nA6HTYi0042743@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 5171
Logged by: Jason
Email address: jason(at)beanfield(dot)com
PostgreSQL version: 8.4
Operating system: FreeBSD
Description: Composite type with array does not translate in
plpythonu
Details:
When I have a plpythonu function returning a composite type that has an
array column, the function does not work when I try to return a list for
that column.
create type test_array as (
col1 text[]
);
create function return_array(val1 text, val2 text) returns test_array
as $$
return {'col1': [val1, val2]}
$$ language plpythonu;
select return_array('test1','test2')
ERROR: missing dimension value
********** Error **********
ERROR: missing dimension value
SQL state: 22P02
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Jason <jason(at)beanfield(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5171: Composite type with array does not translate in plpythonu |
Date: | 2009-11-07 10:23:12 |
Message-ID: | 1257589392.27480.0.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
On fre, 2009-11-06 at 17:29 +0000, Jason wrote:
> When I have a plpythonu function returning a composite type that has an
> array column, the function does not work when I try to return a list for
> that column.
There is a patch proposed to address that in 8.5, but before that,
arrays are pretty much not supported in plpythonu.
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Jason <jason(at)beanfield(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5171: Composite type with array does not translate in plpythonu |
Date: | 2009-11-08 21:33:17 |
Message-ID: | 603c8f070911081333h1b2c8011jc046ab5e404e15e7@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
On Sat, Nov 7, 2009 at 5:23 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On fre, 2009-11-06 at 17:29 +0000, Jason wrote:
>> When I have a plpythonu function returning a composite type that has an
>> array column, the function does not work when I try to return a list for
>> that column.
>
> There is a patch proposed to address that in 8.5, but before that,
> arrays are pretty much not supported in plpythonu.
Is this at all related to bug #5128?
...Robert
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Jason <jason(at)beanfield(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5171: Composite type with array does not translate in plpythonu |
Date: | 2009-11-09 08:33:04 |
Message-ID: | 1257755584.12918.0.camel@fsopti579.F-Secure.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
On Sun, 2009-11-08 at 16:33 -0500, Robert Haas wrote:
> On Sat, Nov 7, 2009 at 5:23 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> > On fre, 2009-11-06 at 17:29 +0000, Jason wrote:
> >> When I have a plpythonu function returning a composite type that has an
> >> array column, the function does not work when I try to return a list for
> >> that column.
> >
> > There is a patch proposed to address that in 8.5, but before that,
> > arrays are pretty much not supported in plpythonu.
>
> Is this at all related to bug #5128?
It's in the same area, but fixing one won't fix the other, I think.
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Jason <jason(at)beanfield(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5171: Composite type with array does not translate in plpythonu |
Date: | 2009-11-12 13:22:59 |
Message-ID: | 1258032179.26305.20.camel@fsopti579.F-Secure.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
On lör, 2009-11-07 at 12:23 +0200, Peter Eisentraut wrote:
> On fre, 2009-11-06 at 17:29 +0000, Jason wrote:
> > When I have a plpythonu function returning a composite type that has an
> > array column, the function does not work when I try to return a list for
> > that column.
>
> There is a patch proposed to address that in 8.5, but before that,
> arrays are pretty much not supported in plpythonu.
Btw., I just checked out your example against said patch and it works.
So something to look forward to ... ;-)