Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: request for help with COPY syntax



"Chuck D." <pgsql-list(at)nullmx(dot)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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group