Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference? - Mailing list pgsql-general

From Brice Ruth
Subject Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?
Date
Msg-id 3A817A1F.8544A75C@webprojkt.com
Whole thread Raw
In response to Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?  (Michael Fork <mfork@toledolink.com>)
Responses Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?  ("Dominic J. Eidson" <sauron@the-infinite.org>)
Re: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?  ("Brett W. McCoy" <bmccoy@chapelperilous.net>)
Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?  (Christopher Sawtell <csawtell@xtra.co.nz>)
List pgsql-general
Is there a simple (unix) command I can run on text files to convert
cr/lf to lf?  The way I did it seemed pretty ass-backward to me (not to
mention time consuming).

-Brice

Tom Lane wrote:
>
> Brice Ruth <brice@webprojkt.com> writes:
> > Here's my latest tactic: I'm guessing that the data 'corruption' has
> > something to do with the way the data was exported from the original
> > database by the third party ... probably something with the cr/lf
> > linebreaks or something to that effect (the data field in question
> > happens to be the last field in a line in the data file).
>
> Ooooh ... the queries you were showing us made it look like the column
> was not the last one, so I hadn't thought of that.  Almost certainly,
> your extra character is a CR.  Postgres expects plain LF as newline in
> COPY data files; if the newlines are actually CR/LF then the CRs will
> be taken as part of the last data field.
>
>                         regards, tom lane

--
Brice Ruth
WebProjkt, Inc.
VP, Director of Internet Technology
http://www.webprojkt.com/

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Number of open files
Next
From: Tom Lane
Date:
Subject: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?