import java.sql.*; public class ArrayTest { public static void main(String args[]) throws Exception { Class.forName("org.postgresql.Driver"); Connection conn = DriverManager.getConnection("jdbc:postgresql://localhost:5830/jurka","jurka",""); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT '{{1,2,3},{4,5,6}}'::int[]"); rs.next(); Array arr = rs.getArray(1); ResultSet arrRS = arr.getResultSet(); arrRS.next(); System.out.println(arrRS.getString(1)); Array a1 = arrRS.getArray(1); ResultSet rs1 = a1.getResultSet(); while (rs1.next()) { System.out.println(rs1.getInt(1)); } rs1.close(); arrRS.next(); System.out.println(arrRS.getString(1)); Array a2 = arrRS.getArray(1); ResultSet rs2 = a2.getResultSet(); while (rs2.next()) { System.out.println(rs2.getInt(1)); } rs2.close(); arrRS.close(); rs.close(); stmt.close(); conn.close(); } }