Re: [GENERAL] Help with copy (loading TSV file into table as text)

2011-10-25 Thread Albe Laurenz
Allan Kamau wrote: > #COPY a.t(raw_data)FROM '/data/tmp/t.txt' WITH FORMAT text; > > yields "ERROR: syntax error at or near "FORMAT" You'll have to use the syntax as documented: COPY ... FROM ... WITH (FORMAT 'text'); Yours, Laurenz Albe -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] Help with copy (loading TSV file into table as text)

2011-10-24 Thread Raymond O'Donnell
On 24/10/2011 22:39, Allan Kamau wrote: > On Mon, Oct 24, 2011 at 11:29 PM, Raymond O'Donnell wrote: >> On 24/10/2011 20:23, Allan Kamau wrote: >>> 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 im

Re: [GENERAL] Help with copy (loading TSV file into table as text)

2011-10-24 Thread Allan Kamau
On Mon, Oct 24, 2011 at 11:29 PM, Raymond O'Donnell wrote: > On 24/10/2011 20:23, Allan Kamau wrote: >> 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

Re: [GENERAL] Help with copy (loading TSV file into table as text)

2011-10-24 Thread Raymond O'Donnell
On 24/10/2011 20:23, Allan Kamau wrote: > 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

[GENERAL] Help with copy (loading TSV file into table as text)

2011-10-24 Thread Allan Kamau
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