BUG #5171: Composite type with array does not translate in plpythonu - Mailing list pgsql-bugs

From Jason
Subject BUG #5171: Composite type with array does not translate in plpythonu
Date
Msg-id 200911061729.nA6HTYi0042743@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5171: Composite type with array does not translate in plpythonu  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5171
Logged by:          Jason
Email address:      jason@beanfield.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5170: Source files missing
Next
From: Peter Eisentraut
Date:
Subject: Re: BUG #5171: Composite type with array does not translate in plpythonu