Re: Set COLLATE on a session level

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Set COLLATE on a session level
Дата
Msg-id 76c8ddd8-f52d-4020-a767-06ce1db11d0f@manitou-mail.org
обсуждение исходный текст
Ответ на Re: Set COLLATE on a session level  (Dirk Mika <Dirk.Mika@mikatiming.de>)
Ответы Aw: Re: Set COLLATE on a session level
Список pgsql-general
    Dirk Mika wrote:

> My sentence was more along the lines that I cannot imagine that I am the
> first to have this problem and that there should therefore be an easier
> solution. But apparently the topic is not so relevant in general. 😉


I'm not sure, but it's plausible that with Oracle, the real use case
for ALTER SESSION SET nls_sort=... is to avoid a binary sort.
There's a clear difference between binary sort and all linguistic
sorts, but few differences across linguistic sorts.
These differences tend to be subtle and ignorable by end users.
Also when storing texts from multiple languages in a database, a
session parameter picking a specific region/language will be right
for only a portion of your texts anyway.


With PostgreSQL, if the database is in UTF8 encoding with a default
collation like "en_US", or more generally language_COUNTRY,
the default sorts are already performed with the Unicode collation
algorithm (by the operating system libc) with reasonable generic
sort rules. Possibly most users would not even notice the
differences that would occur between collations if you used
per-language collations according to users preferences.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: https://www.manitou-mail.org
Twitter: @DanielVerite



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

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Aw: Re: Set COLLATE on a session level
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Aw: Re: Set COLLATE on a session level