From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-list@nullmx.com
Cc: pgsql-sql@postgresql.org
Subject: Re: request for help with COPY syntax
Date: Thu, 25 Oct 2007 23:22:10 -0400
Message-ID: <2080.1193368930@sss.pgh.pa.us> (raw)
In-Reply-To: <200710252016.16121.pgsql-list@nullmx.com>
References: <043e01c8174c$61157a50$8f01010a@iptel.com.ar>
<200710252016.16121.pgsql-list@nullmx.com>
"Chuck D." <pgsql-list@nullmx.com> 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
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-list@nullmx.com
Subject: Re: request for help with COPY syntax
In-Reply-To: <2080.1193368930@sss.pgh.pa.us>
* 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