On Wed, 10 Mar 2010, Andreas Joseph Krogh wrote:
> I have a query which returns a multidimentional array (2D) of varchar
> and I'm having problems retrieving the results using JDBC.
>
> First, since PG doesn't support arrays of arrays, I've created a custom
> type:
PG does support multidimensional arrays:
kjurka=# select array[array['a','b'],array['c','d']];
array
---------------
{{a,b},{c,d}}
(1 row)
You can then unnest these arrays according to the
testMultiDimensionalArray or testRecursiveResultSets examples here:
http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/jdbc/pgjdbc/org/postgresql/test/jdbc2/ArrayTest.java?rev=1.19&content-type=text/x-cvsweb-markup
Kris Jurka