title: Postgresql array_agg of multiple columns with JDBC
body: <p>I'm trying to join a table that might have multiple entries for the given id and aggregate the rows corresponding to this id in an array. This looks as follows in the SQL query: </p>
  
  <pre><code>SELECT * from data
  LEFT JOIN (select id, array_agg(row(foo, bar)) AS foo_bar_data from foo_bar_table group by id) AS temp using(id)
  </code></pre>
  
  <p>This works as intended, but I'm having trouble reading out the result in JDBC. </p>
  
  <pre><code>ResultSet rs = st.executeQuery(...)
  Array a = rs.getArray("foo_bar_data")
  // Now I want to iterate over the array, reading the values foo and bar of each item.
  </code></pre>
  
  <p>My efforts so far always ended in a <code>Method org.postgresql.jdbc4.Jdbc4Array.getArrayImpl(long,int,Map) is not yet implemented.</code> exception. How can I iterate over <code>a</code>, retrieving the values <code>foo</code> and <code>bar</code>?</p>
  
  <p>Edit: I should possibly also mention, that <code>foo</code> and <code>bar</code> don't have the same type.</p>