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: 2007-10-25 16:57:49
Message-ID: 4720CB0D.4050403@presinet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2007-10-25 17:03:21 Re: (repost) Help understanding expressions in order by clause
Previous Message Steve Midgley 2007-10-25 16:44:36 (repost) Help understanding expressions in order by clause