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

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Allan Kamau *EXTERN*" <kamauallan(at)gmail(dot)com>, "Postgres General Postgres General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Help with copy (loading TSV file into table as text)
Date: 2011-10-25 09:12:18
Message-ID: D960CB61B694CF459DCFB4B0128514C2070C37B8@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mark Cave-Ayland 2011-10-25 10:51:16 Re: PostGIS in a commercial project
Previous Message Michael Graham 2011-10-25 08:36:18 unnest and string_to_array on two columns