Re: Can't dump and restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Peter Darley" <pdarley(at)kinesis-cem(dot)com>
Cc: "Pgsql-Admin" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Can't dump and restore
Date: 2005-11-01 21:21:33
Message-ID: 28279.1130880093@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Peter Darley" <pdarley(at)kinesis-cem(dot)com> writes:
> I'm having some trouble restoring data that was dumped from my database.
> When I dump out a table (pg_dump -d neo -t question > question.tbl) and try
> to restore it (psql -d temp -f question.tbl) I get errors on certain rows:
> "psql:question.tbl:15861: ERROR: invalid byte sequence for encoding
> "UNICODE": 0xe96520". This happens when I use SQL_ASCII or UNICODE as the
> encoding. I didn't try any other encodings.

Er, what is the encoding of the source database, exactly? Is it the
same as the encoding of the destination database?

SQL_ASCII disables all encoding checks, so it's entirely plausible that
you would have byte sequences that are not legal Unicode in a SQL_ASCII
database. If so, there's not much to do except manually clean up the
bogus data.

Also, if you're trying to restore into PG 8.1 from an older version,
we've fixed some mistakes in the Unicode encoding checker, so there
actually are differences in what the code will accept :-(

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2005-11-01 21:37:43 Re: Can't dump and restore
Previous Message Warren Little 2005-11-01 20:05:15