Search Postgresql Archives

Re: Wrong sorting on docker image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux