From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jamie Lawrence <jal@jal.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Different encodings in different DBs in same cluster
Date: Sun, 24 Jul 2005 14:41:44 -0400
Message-ID: <21993.1122230504@sss.pgh.pa.us> (raw)
In-Reply-To: <20050721183224.GA19811@clueinc.net>
References: <20050721183224.GA19811@clueinc.net>
Jamie Lawrence <jal@jal.org> writes:
> I see:
> Since these locale settings are frozen by initdb, the apparent
> flexibility to use different encodings in different databases of a
> cluster is more theoretical than real.
> Does anyone know what "more theoretical than real" mean in this context?
It means there are some locales that actively fail (you get inconsistent
comparison and sorting behavior) when presented with multibyte data that
doesn't match their encoding expectations. IMHO such locale definitions
are broken and should be fixed, but they are not under our control.
> If I set the locale to C, is it going to work correctly with UTF8
> encoded data?
C will work "correctly" for suitably small values of "correctly" ---
non-ASCII characters may not sort where you'd wish, and it won't know
anything about case-folding for non-ASCII characters. But it will at
least give consistent results.
When you use a non-C locale, it's best to stick to the encoding that
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, jal@jal.org
Subject: Re: Different encodings in different DBs in same cluster
In-Reply-To: <21993.1122230504@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