Re: problem comparing strings when different cluster / database encoding

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: problem comparing strings when different cluster / database encoding
Дата
Msg-id 12876.1144276764@sss.pgh.pa.us
обсуждение исходный текст
Ответ на problem comparing strings when different cluster / database encoding  (Tomas Vondra <tv@fuzzy.cz>)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: problem comparing strings when different cluster / database encoding
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: problem comparing strings when different cluster / database encoding