From: | "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at> |
---|---|
To: | Oleksandr Voytsekhovskyy <young(dot)inbox(at)gmail(dot)com> |
Cc: | PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Wrong sorting on docker image |
Date: | 2021-10-16 12:32:35 |
Message-ID: | YWrGY2xWibiqa0GP@hjp.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-10-16 15:42:02 | Re: Wrong sorting on docker image |
Previous Message | Oleksandr Voytsekhovskyy | 2021-10-16 10:50:31 | Wrong sorting on docker image |