From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Vecernik <vecernik@aon.at>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: import error
Date: Tue, 28 Jan 2003 10:28:26 -0500
Message-ID: <13248.1043767706@sss.pgh.pa.us> (raw)
In-Reply-To: <3E368509.9050200@aon.at>
References: <3E368509.9050200@aon.at>
Oliver Vecernik <vecernik@aon.at> writes:
> My import gives following error:
> sport=# copy dives from '/var/n/tmp/ov.CSV' delimiters ',';
> ": can't parse "ne 1, pg_atoi: error in "0
The weird formatting of the error message suggests that the problem
is DOS-style newlines (CR/LF). COPY only likes Unix-style newlines
(LF). It thinks the CRs are part of the data, and then the datatype
input routines (like pg_atoi) spit up. Since pg_atoi spits back the
text it couldn't parse (including the CR), you get this bizarre-looking
overprinted message.
Solution: save the import file with Unix newlines, or run it through
a newline-fixing filter.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, vecernik@aon.at
Subject: Re: import error
In-Reply-To: <13248.1043767706@sss.pgh.pa.us>
* 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