Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 485279F98FB for ; Thu, 25 Oct 2007 13:58:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 90606-04 for ; Thu, 25 Oct 2007 13:57:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from presinet.com (mail.presinet.com [209.53.156.1]) by postgresql.org (Postfix) with ESMTP id BAD739FC59D for ; Thu, 25 Oct 2007 13:57:53 -0300 (ADT) Received: from [10.10.1.151] ([10.10.1.151]) by presinet.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 25 Oct 2007 09:55:36 -0700 Message-ID: <4720CB0D.4050403@presinet.com> Date: Thu, 25 Oct 2007 09:57:49 -0700 From: Bricklen Anderson User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: pgsql-list@nullmx.com CC: pgsql-sql@postgresql.org Subject: Re: request for help with COPY syntax References: <200710251016.01844.pgsql-list@nullmx.com> In-Reply-To: <200710251016.01844.pgsql-list@nullmx.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 Oct 2007 16:55:36.0578 (UTC) FILETIME=[DD67A620:01C81727] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/120 X-Sequence-Number: 29492 Chuck D. wrote: > Pardon me on this, the cat -A report for the failed line (and subsequent > lines) shows ^M$ within the field, not just $. > > I assume that is probably a \r\n and postgres wants \r for field data and \n > to end a line. > > I've tried working this over with sed but can't get the syntax right. I also > have iconv installed if that would help any. Are there any good tools that > will tell me what this really is instead of just ^M$ ? If all you just want to do is strip out the ^M, you can run dos2unix on it, assuming that you are running a *nix distro.