From: Oliver Elphick <olly@lfix.co.uk>
To: Jean Huveneers <j.huveneers@farcourier.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Upgrading from 7.1.2 to 7.2.1 on new server
Date: 21 Apr 2002 20:00:54 +0100
Message-ID: <1019415655.27903.3426.camel@linda> (raw)
In-Reply-To: <71E201BE5E881C46811BA160694C5FCB014F97@fs1000.farcourier.com>
References: <71E201BE5E881C46811BA160694C5FCB014F97@fs1000.farcourier.com>
On Sun, 2002-04-21 at 14:45, Jean Huveneers wrote:
> I've been using postgres 7.1.3 in production with a couple of unicode
> databases.
> Last week we bought a new server, i've installed RedHat Linux 7.2 on it
> with postgres SQL 7.2.1.
>
> Now, went i to move the data ('pg_dumpall > data_dump' on the old
> server, psql template1 < data_dump data on the new server) i get an
> error. psql continous but, same tables on the new server are not filled.
> the error has something to do with 'illage unicode character sequence'.
>
> Can somebody please give me some advise on how i fix these errors? or is
> there another way to upgrade than via pg_dump?
The problem is that 7.1.3 and earlier did not check for valid unicode
characters. Somehow, single characters with the eighth bit set were
allowed into the data; these look like unicode leadins, and are rejected
because they seem to be unicode characters above 0x10000.
The solution is to set the client encoding to SQL-ASCII or maybe LATIN9
while reading them in; thus they get converted to unicode (UTF_8)
between frontend and backend. I am not sure, however, whether this
adequately protects real UTF-8 characters that may be mingled in the
data. I suppose the alternative is to run a Perl script to check for
high-bit characters that are not valid UTF-8 for characters below
0x10000.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
"The sacrifices of God are a broken spirit; a broken
and a contrite heart, O God, thou wilt not despise."
Psalms 51:17
Attachments:
signature.asc (application/pgp-signature, 231B) download
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: olly@lfix.co.uk, j.huveneers@farcourier.com
Subject: Re: Upgrading from 7.1.2 to 7.2.1 on new server
In-Reply-To: <1019415655.27903.3426.camel@linda>
References: <71E201BE5E881C46811BA160694C5FCB014F97@fs1000.farcourier.com> <1019415655.27903.3426.camel@linda>
* 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