pg_dump usage - problems with restore due to the use of tab delimiters - Mailing list pgsql-general

From Rich Ryan
Subject pg_dump usage - problems with restore due to the use of tab delimiters
Date
Msg-id 07a101c16829$ac309f20$1a02a8c0@usedcars.com
Whole thread Raw
Responses Re: pg_dump usage - problems with restore due to the use of tab delimiters
List pgsql-general
Hi all,
    I'm using pg_dump and pgsql to migrate from pgsql 7.0 to 7.1.3. The dump
goes fine, but upon recreating the database via pgsql, I get error messages
like:
ERROR:  copy: line 1587, Bad int8 external representation " "
PQendcopy: resetting connection

After doing a lot of work separating COPY commands into separate files and
running them individually, I was able to find the row causing the problem.
It looked like
123123123123    This is my var char field with lots of nasty end of line
characters from a web page textbox field.^M
There's one line break, ^M
There's another..^M
And a bunch at the end by themselves, that seem to cause the problem...^M
^M
^M
^M
\N

Lots of my records have linebreaks in them (the ^M character), but only a
few of them with a certain pattern of linebreaks seem to confuse pgsql. My
question is there any workaround to this, for example, any way I can get
pg_dump to use another field delimiter than tab?
Thanks much,
Rich Ryan




pgsql-general by date:

Previous
From: "Eric Ridge"
Date:
Subject: Re: pg_dump and DEFAULT column values
Next
From: Bo Lorentsen
Date:
Subject: Re: Caching query plan...