pg_dump usage - problems with restore due to the use of tab delimiters

From: "Rich Ryan" <rich(at)usedcars(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: pg_dump usage - problems with restore due to the use of tab delimiters
Date: 2001-11-08 07:47:52
Message-ID: 07a101c16829$ac309f20$1a02a8c0@usedcars.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bo Lorentsen 2001-11-08 08:20:42 Re: Caching query plan...
Previous Message Eric Ridge 2001-11-08 05:45:33 Re: pg_dump and DEFAULT column values