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

From Josh Berkus
Subject Re: Wierd error for COPY command
Date
Msg-id web-1385663@davinci.ethosmedia.com
Whole thread Raw
In response to Re: Wierd error for COPY command  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Wierd error for COPY command  ("Josh Berkus" <josh@agliodbs.com>)
List 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
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


pgsql-sql by date:

Previous
From: "Nick Fankhauser"
Date:
Subject: Re: How do I create unique IDs for an existing set of records
Next
From: "Josh Berkus"
Date:
Subject: Re: Wierd error for COPY command