import java.sql.*; public class ArrayTest4 { public static void main(String args[]) throws Exception { Class.forName("org.postgresql.Driver"); Connection conn; conn = DriverManager.getConnection("jdbc:postgresql://localhost:5830/jurka","jurka",""); try { testMultiDim(conn); } catch (Exception e) { e.printStackTrace(); } conn.close(); conn = DriverManager.getConnection("jdbc:postgresql://localhost:5830/jurka?compatible=8.1","jurka",""); try { testMultiDim(conn); } catch (Exception e) { e.printStackTrace(); } conn.close(); } private static void testMultiDim(Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT '{{1,2},{4,5}}'::int[]"); rs.next(); Array arr = rs.getArray(1); Integer i[][] = (Integer[][])arr.getArray(); rs.close(); stmt.close(); } }