creating array of integer[] out of query - how?

From: "Massa, Harald Armin" <chef(at)ghum(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: creating array of integer[] out of query - how?
Date: 2009-09-02 08:34:31
Message-ID: e3e180dc0909020134n7a654a75s2172b08a487c45d0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

if I use this statement:

postgres=# select array[[2,3],[3,4]];
array
---------------
{{2,3},{3,4}}

-> the result looks for me as an array of integer-arrays

now I try:

select array(
select a from
(
select array[2,3] as a
union

select array[3,4] as a
) x);

and the result is:

FEHLER: could not find array type for datatype integer[]

Is there a bug in my thinking that array[[2,3],[3,4]] really constitutes an
array of integer[],

or is there any cast missing,

or is a bug anywhere else?

Best wishes,

Harald

--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pigeon
-
LASIK good, steroids bad?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2009-09-02 08:54:56 Re: creating array of integer[] out of query - how?
Previous Message Devrim GÜNDÜZ 2009-09-02 08:15:03 PostgreSQL Live CD based on CentOS 5.3 and PG 8.4 released