Re: Retrieving multidimentional array-column using JDBC
| От | Kris Jurka |
|---|---|
| Тема | Re: Retrieving multidimentional array-column using JDBC |
| Дата | |
| Msg-id | alpine.BSO.2.00.1003101306580.29315@leary.csoft.net обсуждение исходный текст |
| Ответ на | Retrieving multidimentional array-column using JDBC (Andreas Joseph Krogh <andreak@officenet.no>) |
| Ответы |
Re: Retrieving multidimentional array-column using JDBC
|
| Список | pgsql-jdbc |
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
В списке pgsql-jdbc по дате отправления: