Copying (importing) data into a column of a PostgreSQL array

How should I format a text file (CSV?) So that it can be imported (using COPY ?) Into an array column in a PostgreSQL table (8.4)?

This table is testarray :

  Column | Type | ---------+-------------------------| rundate | date | runtype | integer | raw | double precision[] | labels | character varying(16)[] | results | double precision[] | outcome | character varying(8)[] | 

and

 COPY testarray from '/tmp/import.txt' CSV 

none of the following import.txt actions work:

 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' 
+7
source share
1 answer
 COPY testarray from '/tmp/import.txt' CSV 2010-06-22,88,"{{1,2},{3,4}}","{{1,2},{3,4}}","{{1,2},{3,4}}","{{1,2},{3,4}}" 
+13
source

All Articles