Re: Wierd error for COPY command

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "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:51:19
Message-ID: web-1385663@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tom,

> 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.

Yes, you're right. Apparently I have /r/n newlines, plus a ZL string
in the last field indicating Null. I know that there's a command line
utility to convert DOS newlines into UNIX newlines; could anyone give
me a name?

-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christoph Haller 2002-04-26 17:05:27 view on system tables upgrade?
Previous Message Nick Fankhauser 2002-04-26 16:17:51 Re: How do I create unique IDs for an existing set of records