Received: from morpheus.webprojkt.com (morpheus.webprojkt.com [209.61.155.148]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f17Gcxx74214 for ; Wed, 7 Feb 2001 11:39:00 -0500 (EST) (envelope-from brice@webprojkt.com) Received: (qmail 30153 invoked by uid 604); 7 Feb 2001 16:38:55 -0000 Received: from unknown (HELO webprojkt.com) (216.170.131.123) by morpheus.webprojkt.com with SMTP; 7 Feb 2001 16:38:55 -0000 Message-ID: <3A817A1F.8544A75C@webprojkt.com> Date: Wed, 07 Feb 2001 10:38:53 -0600 From: Brice Ruth X-Mailer: Mozilla 4.76 (Macintosh; U; PPC) X-Accept-Language: en MIME-Version: 1.0 To: Tom Lane CC: Michael Fork , Ian Harding , pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference? References: <3A816921.FEB47B80@webprojkt.com> <28366.981560901@sss.pgh.pa.us> <3A8172DD.C91DDCF2@webprojkt.com> <28516.981562472@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200102/341 X-Sequence-Number: 4214 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 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/