From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tv@fuzzy.cz>
Cc: pgsql-sql@postgresql.org
Subject: Re: problem comparing strings when different cluster / database encoding
Date: Wed, 05 Apr 2006 18:39:24 -0400
Message-ID: <12876.1144276764@sss.pgh.pa.us> (raw)
In-Reply-To: <443444B5.1010205@fuzzy.cz>
References: <443444B5.1010205@fuzzy.cz>
Tomas Vondra <tv@fuzzy.cz> writes:
> I've encountered a strange problem. We have a PG 8.0.x database cluster
> (in the sense used in initdb, i.e. bunch of databases) created with
> UNICODE encoding, namely cs_CZ.UTF-8 locale.
> When a database is created with a different encoding (in our case it's
> LATIN2) the string comparison doesn't work correctly.
That's right. This doesn't work, and is warned against in our docs (at
least in recent versions). You really must keep server_encoding
matching the encoding the locale expects, for all except "trivial"
locales such as C that have no encoding expectations.
We'd forbid these combinations if there were any fully portable way to
detect which encoding the locale expects...
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, tv@fuzzy.cz
Subject: Re: problem comparing strings when different cluster / database encoding
In-Reply-To: <12876.1144276764@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