pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bricklen Anderson <banderson@presinet.com>
To: pgsql-list@nullmx.com
Cc: pgsql-sql@postgresql.org
Subject: Re: request for help with COPY syntax
Date: Thu, 25 Oct 2007 09:57:49 -0700
Message-ID: <4720CB0D.4050403@presinet.com> (raw)
In-Reply-To: <200710251016.01844.pgsql-list@nullmx.com>
References: <200710251016.01844.pgsql-list@nullmx.com>

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.



view thread (18+ messages)  latest in thread

Message-ID: <4720CB0D.4050403@presinet.com>
Permalink:  ../4720CB0D.4050403@presinet.com/
Also on:    postgresql.org/message-id/4720CB0D.4050403@presinet.com

 · 

reply

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: banderson@presinet.com, pgsql-list@nullmx.com
  Subject: Re: request for help with COPY syntax
  In-Reply-To: <4720CB0D.4050403@presinet.com>

* 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