From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Darley <pdarley@kinesis-cem.com>
Cc: Pgsql-Admin <pgsql-admin@postgresql.org>
Subject: Re: Can't dump and restore
Date: Tue, 01 Nov 2005 16:21:33 -0500
Message-ID: <28279.1130880093@sss.pgh.pa.us> (raw)
In-Reply-To: <PDEOIIFFBIAABMGNJAGPIEEPDPAA.pdarley@kinesis-cem.com>
References: <PDEOIIFFBIAABMGNJAGPIEEPDPAA.pdarley@kinesis-cem.com>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, pdarley@kinesis-cem.com
Subject: Re: Can't dump and restore
In-Reply-To: <28279.1130880093@sss.pgh.pa.us>
References: <PDEOIIFFBIAABMGNJAGPIEEPDPAA.pdarley@kinesis-cem.com> <28279.1130880093@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox