multidimensional arrays - Mailing list pgsql-general

From Ketema
Subject multidimensional arrays
Date
Msg-id 1178064875.009615.131640@q75g2000hsh.googlegroups.com
Whole thread Raw
Responses Re: multidimensional arrays
List 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!


pgsql-general by date:

Previous
From: Paul Lambert
Date:
Subject: Re: PG Books
Next
From: Rich Shepard
Date:
Subject: Re: CHECK() Constraint on Column Using Lookup Table