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 archives
  Advanced Search

Re: request for help with COPY syntax


  • From: Bricklen Anderson <banderson(at)presinet(dot)com>
  • To: pgsql-list(at)nullmx(dot)com
  • Cc: pgsql-sql(at)postgresql(dot)org
  • Subject: Re: request for help with COPY syntax
  • Date: Thu, 25 Oct 2007 09:57:49 -0700
  • Message-id: <4720CB0D.4050403@presinet.com> <text/plain>

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.



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group