Re: Mixing different LC_COLLATE and database encodings - Mailing list pgsql-general

From Tom Lane
Subject Re: Mixing different LC_COLLATE and database encodings
Date
Msg-id 20522.1140288009@sss.pgh.pa.us
Whole thread Raw
In response to Mixing different LC_COLLATE and database encodings  (Bill Moseley <moseley@hank.org>)
Responses Re: Mixing different LC_COLLATE and database encodings  (Bill Moseley <moseley@hank.org>)
List pgsql-general
Bill Moseley <moseley@hank.org> writes:
> - To clarify the first point, if the database is encoded utf-8 and
> lc_collate is en_US then Postgresql does NOT try to convert utf-8 to
> 8859-1 before sorting.

Basically, this is a horribly bad idea and you should never do it.
The database encoding should always match what the locale assumes
for its character set (unless the locale is "C", which doesn't care).

We'd enforce that you never do it if we knew a portable way to determine
the character set assumed by an LC_COLLATE setting.

            regards, tom lane

pgsql-general by date:

Previous
From: Andrew - Supernews
Date:
Subject: Re: Non-Overlaping date interval index
Next
From: David Rio Deiros
Date:
Subject: Re: C trigger using system(3) to execute a php script