Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 6D47E9FA1A9 for ; Fri, 26 Oct 2007 00:22:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 43626-02 for ; Fri, 26 Oct 2007 00:22:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 858619FA3F9 for ; Fri, 26 Oct 2007 00:22:15 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l9Q3MA4K002081; Thu, 25 Oct 2007 23:22:10 -0400 (EDT) To: pgsql-list@nullmx.com cc: pgsql-sql@postgresql.org Subject: Re: request for help with COPY syntax In-reply-to: <200710252016.16121.pgsql-list@nullmx.com> References: <043e01c8174c$61157a50$8f01010a@iptel.com.ar> <200710252016.16121.pgsql-list@nullmx.com> Comments: In-reply-to "Chuck D." message dated "Thu, 25 Oct 2007 20:16:15 -0600" Date: Thu, 25 Oct 2007 23:22:10 -0400 Message-ID: <2080.1193368930@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/129 X-Sequence-Number: 29501 "Chuck D." writes: > I tried this, which I found on the web from Tom Lane: > sed 's/^M/\\r/g' geonames.txt > geonames_fixed.txt > But still get the same error. I used ctrl-v ctrl-m to reproduce the > ^M. Not sure why it is kicking out those lines still. Did the sed actually do anything? (Hint: the file size of geonames_fixed.txt would be larger than geonames.txt if it did. Or you could diff the two files to confirm that something sensible happened.) I suspect that your shell may be fouling things up here. You may need to prepare this command as a one-line shell script, using an editor that doesn't barf on bare carriage returns ... regards, tom lane