title: Updating ResultSets with SQL Array types in JDBC / PostgreSQL
body: <p>I'm trying to use a SQL Array type with PostgreSQL 8.4 and the JDBC4 driver.</p>
  
  <p>My column is defined as follows:</p>
  
  <pre><code>nicknames           CHARACTER VARYING(255)[]    NOT NULL
  </code></pre>
  
  <p>and I'm trying to update it thusly:</p>
  
  <pre><code>row.updateArray("nicknames", 
      connection.createArrayOf("CHARACTER VARYING", p.getNicknames().toArray()));
  </code></pre>
  
  <p>(<code>p.getNicknames()</code> returns a <code>List&lt;String&gt;</code>)</p>
  
  <p>but I'm seeing:</p>
  
  <blockquote>
    <p>org.postgresql.util.PSQLException:
    Unable to find server array type for
    provided name CHARACTER VARYING.  at
    org.postgresql.jdbc4.AbstractJdbc4Connection.createArrayOf(AbstractJdbc4Connection.java:67)
      at
    org.postgresql.jdbc4.Jdbc4Connection.createArrayOf(Jdbc4Connection.java:21)</p>
  </blockquote>
  
  <p>Unfortunately, the Array types don't seem to be well documented - I've not found mention of exactly how to do this for PostgreSQL anywhere :(</p>
  
  <p>Any ideas?</p>