Re: Mixing different LC_COLLATE and database encodings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bill Moseley <moseley(at)hank(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Mixing different LC_COLLATE and database encodings
Date: 2006-02-18 18:40:09
Message-ID: 20522.1140288009@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bill Moseley <moseley(at)hank(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Rio Deiros 2006-02-18 18:59:16 Re: C trigger using system(3) to execute a php script
Previous Message Andreas Kretschmer 2006-02-18 18:38:52 Re: Non-Overlaping date interval index