From: Robert Treat <xzilla@users.sourceforge.net>
To: Andrés Repossi <andres.repossi@c1.pjn.gov.ar>
Cc: pgsql-admin@postgresql.org
Subject: Re: About COPY
Date: 25 Feb 2003 10:09:50 -0500
Message-ID: <1046185790.1015.365.camel@camel> (raw)
In-Reply-To: <006001c2dcd7$390b0ca0$7c02020a@c1.pjn.gov.ar>
References: <006001c2dcd7$390b0ca0$7c02020a@c1.pjn.gov.ar>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: xzilla@users.sourceforge.net, andres.repossi@c1.pjn.gov.ar
Subject: Re: About COPY
In-Reply-To: <1046185790.1015.365.camel@camel>
References: <006001c2dcd7$390b0ca0$7c02020a@c1.pjn.gov.ar> <1046185790.1015.365.camel@camel>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox