Re: Wierd error for COPY command - Mailing list pgsql-sql

From Tom Lane
Subject Re: Wierd error for COPY command
Date
Msg-id 26746.1019837496@sss.pgh.pa.us
Whole thread Raw
In response to Wierd error for COPY command  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: Wierd error for COPY command  ("Josh Berkus" <josh@agliodbs.com>)
List pgsql-sql
"Josh Berkus" <josh@agliodbs.com> writes:
> I'm getting the following error:

> jwnet=# copy elbs_udf from '/home/jwnet/testtransfer/udf.txt'
> jwnet-# using delimiters '|' with null as '';
> ": can't parse "ne 1, pg_atoi: error in "1
> jwnet=#

I'll bet your file contains \r\n newlines not \n.  The weird look
of the error comes from copy echoing the \r as part of the "data
item" it's unhappy about.  Try examining the log entry using od -c
if you want to see exactly what's there.
        regards, tom lane


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: view on system tables upgrade?
Next
From: Tom Lane
Date:
Subject: Re: How do I create unique IDs for an existing set of records