Re: Wierd error for COPY command

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Wierd error for COPY command
Date: 2002-04-26 16:11:36
Message-ID: 26746.1019837496@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Josh Berkus" <josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-04-26 16:14:39 Re: How do I create unique IDs for an existing set of records
Previous Message Tom Lane 2002-04-26 16:04:25 Re: view on system tables upgrade?