title: COPY (import) data into PostgreSQL array column
body: <p>How should a (CSV?) text file be formatted so that it can be imported (with <code>COPY</code>?) into an array column in a PostgreSQL (8.4) table?</p>
  
  <p>Given table <code>testarray</code>:</p>
  
  <pre><code> Column  |          Type           |
  ---------+-------------------------|
   rundate | date                    | 
   runtype | integer                 | 
   raw     | double precision[]      | 
   labels  | character varying(16)[] | 
   results | double precision[]      | 
   outcome | character varying(8)[]  | 
  </code></pre>
  
  <p>and</p>
  
  <pre><code>COPY testarray from '/tmp/import.txt' CSV
  </code></pre>
  
  <p>neither of the following contents of <code>import.txt</code> work:</p>
  
  <pre><code>2010/06/22,88,{{1,2},{3,4}},{{1,2},{3,4}},{{1,2},{3,4}},{{1,2},{3,4}}
  2010/06/22,88,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4
  2010/06/22,88,'{{1,2},{3,4}}','{{1,2},{3,4}}','{{1,2},{3,4}}','{{1,2},{3,4}}'
  2010/06/22,88,'1,2,3,4','1,2,3,4','1,2,3,4','1,2,3,4'
  </code></pre>