pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brice Ruth <brice@webprojkt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Fork <mfork@toledolink.com>
Cc: Ian Harding <iharding@pakrat.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?
Date: Wed, 07 Feb 2001 10:38:53 -0600
Message-ID: <3A817A1F.8544A75C@webprojkt.com> (raw)
References: <Pine.BSI.4.21.0102070915290.197-100000@glass.toledolink.com>
	<3A816921.FEB47B80@webprojkt.com>
	<28366.981560901@sss.pgh.pa.us>
	<3A8172DD.C91DDCF2@webprojkt.com>
	<28516.981562472@sss.pgh.pa.us>

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/



view thread (29+ messages)  latest in thread

Message-ID: <3A817A1F.8544A75C@webprojkt.com>
Permalink:  ../3A817A1F.8544A75C@webprojkt.com/
Also on:    postgresql.org/message-id/3A817A1F.8544A75C@webprojkt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: brice@webprojkt.com, tgl@sss.pgh.pa.us, mfork@toledolink.com, iharding@pakrat.com, pgsql-general@postgresql.org
  Subject: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?
  In-Reply-To: <3A817A1F.8544A75C@webprojkt.com>
  References: <Pine.BSI.4.21.0102070915290.197-100000@glass.toledolink.com> <3A816921.FEB47B80@webprojkt.com> <28366.981560901@sss.pgh.pa.us> <3A8172DD.C91DDCF2@webprojkt.com> <28516.981562472@sss.pgh.pa.us> <3A817A1F.8544A75C@webprojkt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox