Search Postgresql Archives

multidimensional arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux