Re: About COPY - Mailing list pgsql-admin

From Robert Treat
Subject Re: About COPY
Date
Msg-id 1046185790.1015.365.camel@camel
Whole thread Raw
In response to About COPY  (Andrés Repossi <andres.repossi@c1.pjn.gov.ar>)
List pgsql-admin
On Tue, 2003-02-25 at 09:07, Andrés Repossi wrote:
> Hi, I'm new working with PostgreSQL, and I'm trying to load an ascii
> text file to a table using the command copy but it throws me an error
> message that it can't parse the line, and I don't really don't know why
> is this hapening.
>
> The sentence I'm using is:
>
> copy tfal from 'C:\\tfal.txt' with delimiter '|'
>
> Te error message is: ERROR: parser: parse error at or near "delimiter"
>
<snip>
>
> Does anyone had a trouble like this?, I don't understand what am I doing
> wrong. The version of the PGAdmin II I'm using is 1.4.12.
>
> Could anyone lend me a hand please, thanks,
>

I think the syntax your looking for is:

COPY tfal FROM '/tmp/foo' USING DELIMITERS '|';

At least that's how you'd do it in psql

Robert Treat




pgsql-admin by date:

Previous
From: Andrés Repossi
Date:
Subject: About COPY
Next
From: Robert Treat
Date:
Subject: Re: postings appearing twice...