Re: problem comparing strings when different cluster / database encoding
В списке pgsql-sql по дате отправления:
| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера