Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9318A475B85 for ; Tue, 28 Jan 2003 10:28:24 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id D1449475A7F for ; Tue, 28 Jan 2003 10:28:23 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h0SFSQ5u013249; Tue, 28 Jan 2003 10:28:26 -0500 (EST) To: Oliver Vecernik Cc: pgsql-sql Subject: Re: import error In-reply-to: <3E368509.9050200@aon.at> References: <3E368509.9050200@aon.at> Comments: In-reply-to Oliver Vecernik message dated "Tue, 28 Jan 2003 14:26:33 +0100" Date: Tue, 28 Jan 2003 10:28:26 -0500 Message-ID: <13248.1043767706@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/438 X-Sequence-Number: 11303 Oliver Vecernik 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