Hi,
I have a tab delimited file with over a thousand fields (columns)
which I would like to import into postgreSQL.

I have opted to import the entire record (line) of this file into a
single field in a table, one table record per file line. Later split
the contents of the field accordingly into an array for further
processing and decomposition.

I am using the COPY command as follows
#COPY a.t(raw_data)FROM '/data/tmp/t.txt';

and it reports "ERROR:  extra data after last expected column".


#COPY a.t(raw_data)FROM '/data/tmp/t.txt' WITH FORMAT text;

yields "ERROR:  syntax error at or near "FORMAT"


I am running PostgreSQL 9.1.1 compiled from source and deployed on
Fedora Core 14 64bit. Below is the output of version();

m=> SELECT VERSION();
                                                   version
--------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.1.1 on x86_64-unknown-linux-gnu, compiled by gcc (GCC)
4.4.5 20101112 (Red Hat 4.4.5-2), 64-bit
(1 row)


Allan.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to