Skip site navigation (1) Skip section navigation (2)

Re: array variables

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Marcin Krawczyk" <jankes(dot)mk(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: array variables
Date: 2008-11-13 13:59:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
2008/11/13 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
>> 2008/11/13 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>>> My example was done in 8.3.
>> I tested it with error:
>> postgres=# select array(select row(a,b) from f);
>> ERROR:  could not find array type for datatype record
> You left out the cast to a named rowtype --- that's not optional,
> unfortunately.

it works on devel

[pavel(at)localhost pgsql]$ psql postgres
\psql (8.4devel)
Type "help" for help.

postgres=# create table foo(a int, b varchar);
postgres=# insert into foo values(10, 'kuku'),(20,'aba');
postgres=# select array(select row(a,b) from foo);
(1 row)

Pavel Stehule

>                        regards, tom lane

In response to

pgsql-sql by date

Next:From: Sabin CoandaDate: 2008-11-14 07:38:01
Subject: uuid on windows
Previous:From: Tom LaneDate: 2008-11-13 13:52:33
Subject: Re: array variables

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group