2008/11/13 Tom Lane <[EMAIL PROTECTED]>:
> "Pavel Stehule" <[EMAIL PROTECTED]> writes:
>> 2008/11/13 Tom Lane <[EMAIL PROTECTED]>:
>>> Sure you can, if you're using a version new enough to have arrays of
>>> composite types.
>
>> I don't expect so user use devel version ;)
>
> My example was done in 8.3.
>
>> - and result is array of
>> some composite type, not two dimensional array
>

I tested it with error:

postgres=# create table f(a int, b int);
CREATE TABLE
postgres=# insert into f values(10,20);
INSERT 0 1
postgres=# select array(select row(a,b) from f);
ERROR:  could not find array type for datatype record
postgres=# select version();
                                              version
----------------------------------------------------------------------------------------------------
 PostgreSQL 8.3.0 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)
4.1.2 20070925 (Red Hat 4.1.2-33)
(1 row)

I forgot on casting, so I was confused.

Regards
Pavel Stehule


> Well, if the columns are of different types then you'll never be able to
> represent them as a 2-D array, so I thought this was a more general answer.

ok

>
>                        regards, tom lane
>

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to