Re: Sorting in Unicode not working

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Sorting in Unicode not working
Дата
Msg-id 7172.1081616714@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Sorting in Unicode not working  (Holger Klawitter <lists@klawitter.de>)
Список pgsql-general
Holger Klawitter <lists@klawitter.de> writes:
> So in other words, all databases inside postgres must have the same (or at
> least a compatible) encoding+locale

Yup.  strcoll()'s locale setting implicitly assumes a particular
encoding (at least on the platforms I'm familiar with), and so selecting
a database encoding that's incompatible with that will give you bizarre
sorting behavior.  The apparent freedom to select a per-database
encoding is really illusory in the current PG system, at least if you
have specific ideas about what you want the sort order to be.  You
pretty much have to get it right at initdb time.

There was a thread just a day or two back on pgsql-hackers about
generalizing our locale support, which would fix this problem among
others.  I'm not sure how soon it will really happen though...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Sorting in Unicode not working
Следующее
От: kirang@it.iitb.ac.in
Дата:
Сообщение: help needed regarding Query processing in postgres