Re: Can't dump and restore - Mailing list pgsql-admin

From Tom Lane
Subject Re: Can't dump and restore
Date
Msg-id 28279.1130880093@sss.pgh.pa.us
Whole thread Raw
In response to Can't dump and restore  ("Peter Darley" <pdarley@kinesis-cem.com>)
Responses Re: Can't dump and restore
List pgsql-admin
"Peter Darley" <pdarley@kinesis-cem.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

pgsql-admin by date:

Previous
From: "Peter Darley"
Date:
Subject: Can't dump and restore
Next
From: "Peter Darley"
Date:
Subject: Re: Can't dump and restore