Re: Wrong sorting on docker image

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: Wrong sorting on docker image
Дата
Msg-id YWrGY2xWibiqa0GP@hjp.at
обсуждение исходный текст
Ответ на Wrong sorting on docker image  (Oleksandr Voytsekhovskyy <young.inbox@gmail.com>)
Список pgsql-general
On 2021-10-16 13:50:31 +0300, Oleksandr Voytsekhovskyy wrote:
> Starting from version 12.0 official docker image switched from Debian-stretch
> to Debian-bullseye and from that point we have a huge pain with sorting issues
> on Russian collation.
[...]
> Issue:
>
> postgres=# SELECT * FROM unnest(ARRAY ['ея', 'ёа']) name ORDER BY name;
>  name
> ------
>  ёа
>  ея
> (2 строки)
>
>
>
>   еqя should go before  ёqа

Same with the sort command in the shell.


> postgres=# SELECT 'ея' COLLATE "ru_RU" < 'ёа' COLLATE "ru_RU";
>  ?column?
> ----------
>  f
> (1 строка)
>
> And should be TRUE here
>
> Any idea how to fix that?

Since the collation is defined by the OS (or rather its C library)
I think this should be reported to Debian or possibly the glibc
maintainers.

PostgreSQL can also use the ICU locales instead of those provided by the
OS. Have you tried that?

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Вложения

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

Предыдущее
От: Oleksandr Voytsekhovskyy
Дата:
Сообщение: Wrong sorting on docker image
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Wrong sorting on docker image