Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?

From: Brice Ruth <brice(at)webprojkt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Fork <mfork(at)toledolink(dot)com>, Ian Harding <iharding(at)pakrat(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?
Date: 2001-02-07 16:38:53
Message-ID: 3A817A1F.8544A75C@webprojkt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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(at)webprojkt(dot)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/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Crispin Miller 2001-02-07 16:39:55 Re: Not using index
Previous Message Tom Lane 2001-02-07 16:27:33 Re: Number of open files

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-02-07 16:43:11 Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?
Previous Message Tom Lane 2001-02-07 16:14:32 Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?