Re: Problem in 'ORDER BY' of a column using a created collation? - Mailing list pgsql-hackers

From Nishant Sharma
Subject Re: Problem in 'ORDER BY' of a column using a created collation?
Date
Msg-id CADrsxdZtU=hg=iG1iqy5omR92p-ErGnhbMjSM501JB0GJ5ihSA@mail.gmail.com
Whole thread Raw
In response to Re: Problem in 'ORDER BY' of a column using a created collation?  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-hackers
Thanks Daniel for the confirmation!

Looks like nothing more needed as the issue is already
reported with OCI.


Regards,
Nishant Sharma,
EDB, Pune.

On Thu, Oct 2, 2025 at 4:41 PM Daniel Verite <daniel@manitou-mail.org> wrote:
        Nishant Sharma wrote:

> Testing sort order for '1' & 'a' using ICU library with collation =
> 'ja-u-kr-latn-digit'
>
> With Method ucol_strcollUTF8():
> SORT ORDER ASC : '1', 'a'
>
> With Method ucol_nextSortKeyPart() (i.e transform and memcmp):
> SORT ORDER ASC : 'a', '1'

Yes, ucol_strcoll() with kr-latn-digit has been flawed for a
long time [1] and still is in the development branch of ICU.

There's a recent ticket about this [2] with a reproducer similar
to yours.


[1]
https://www.postgresql.org/message-id/flat/153201618542.1404.3611626898935613264%40wrigleys.postgresql.org
[2] https://unicode-org.atlassian.net/browse/ICU-23016


Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: MergeAppend could consider sorting cheapest child path
Next
From: John Naylor
Date:
Subject: Re: GB18030-2022 Support in PostgreSQL