Re: Wrong sorting on docker image

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 15:42:02
Message-ID: 1061942.1634398922@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oleksandr Voytsekhovskyy <young(dot)inbox(at)gmail(dot)com> writes:
> 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.

Yeah, Debian versions after stretch adopted the significant glibc locale
data changes (sorting rule changes) that are discussed at [1].

> ея should go before ёа

I'm not qualified to have an opinion on that point, but one would hope
that the glibc people who changed the sorting rules are qualified.
If you disagree, you need to go discuss it with glibc. Postgres doesn't
define any text sorting rules, we just use what libc or ICU tells us.

Speaking of ICU, if you are using an ICU-enabled Postgres build,
maybe you could find an ICU collation that acts the way you want.
This wouldn't be a perfect solution, because we don't yet have
the ability to set an ICU collation as a database's default.
But you can attach ICU collations to individual text columns,
and maybe that would be a good enough workaround.

regards, tom lane

[1] https://wiki.postgresql.org/wiki/Locale_data_changes

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2021-10-16 16:24:44 Re: "two time periods with only an endpoint in common do not overlap" ???
Previous Message Peter J. Holzer 2021-10-16 12:32:35 Re: Wrong sorting on docker image