Re: help understanding collation order

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: help understanding collation order
Дата
Msg-id 20110117200546.GS3923@shinkuro.com
обсуждение исходный текст
Ответ на Re: help understanding collation order  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, Jan 17, 2011 at 02:19:14PM -0500, Tom Lane wrote:

> No, not particularly.  Sort order is determined by lc_collate
> not lc_messages.  Unfortunately it's entirely possible that OSX
> will give you a different sort order than Linux even for similarly
> named lc_collate settings.  About the only lc_collate setting that
> really behaves the same everywhere, guaranteed, is "C"

This is partly because of the generous room allowed for linguistic
tailoring in the Unicode standard on collation.  In case one really
wants to have a bad day, I can suggest reading
http://unicode.org/reports/tr10/ carefully.  But they make an
important point there, which is that collation rules work by language,
not by script.  As I understand things, in Postgres's case it's partly
a matter of how strongly your OS cleaves to the locale conventions
that determines how this will work.  (Note that not every database
system relies on the underlying OS's facilities the way Postgres does;
some have an independent collation mechanism.)

Unicode does maintain a locale data repository:
http://cldr.unicode.org/.  You might be able to figure out which of
your systems is not playing nice and complain to the OS vendor.

A


--
Andrew Sullivan
ajs@crankycanuck.ca

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

Предыдущее
От: "Igor Neyman"
Дата:
Сообщение: Re: Crosstab query on huge amount of values
Следующее
От: Вячеслав Блинников
Дата:
Сообщение: libpq: how to retrieve query result?