multidimensional arrays

From: Ketema <ketema(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: multidimensional arrays
Date: 2007-05-02 00:14:35
Message-ID: 1178064875.009615.131640@q75g2000hsh.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is it possible to access a subarray of a multi dimensional array as a
whole?

example:

'{
{
{1,2,3}, {11,22,33}, {111,222,333}
},
{
{4,5,6}, {44,55,66}, {444,555,666}
},
{
{7,8,9}, {77,88,99}, {777,888,999}
}
}' --pretend this is _intarray

if wanted to do:
select case when 1 = any(_intarray[1][1]) then true else false end;

this should be equivalent to:
select case when 1 in (1,2,3) then true else false end;

the first statement produces an error about target of any must be an
array. If I try to cast to integer[] i get an error stating that
integer cant be cast to integer[]

Thanks!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-05-02 00:22:13 Re: [GENERAL] Indice en Date
Previous Message Arturo 2007-05-01 23:59:10 Re: [GENERAL] Indice en Date