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

Array of Arrays of int

From: Leo Fink <leo(dot)fink(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Array of Arrays of int
Date: 2005-05-02 03:50:37
Message-ID: 178c0af58f0514c54835d2e0723c525a@gmx.net (view raw or flat)
Thread:
Lists: pgsql-sql
Why does

select array(select array[1,2]);

give me an error: "could not find array type for data type integer[]"?

Is there a type-cast missing, or is this generally impossible? I was 
expecting something like

{{1,2}}

In my real-world application, the subquery returns more than one pair 
of ints, but I think it all boils down to this simpler example. I am 
using version 7.4 of PostgreSQL.

Thanks a lot,
Leo


Responses

pgsql-sql by date

Next:From: Enrico WeigeltDate: 2005-05-02 03:55:53
Subject: Re: pgtop, display PostgreSQL processes in `top' style
Previous:From: Enrico WeigeltDate: 2005-05-02 03:41:00
Subject: Re: trigger/rule question

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