Re: Inconsistent results with libc sorting on Windows - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Inconsistent results with libc sorting on Windows
Date
Msg-id CA+hUKGJX4xeCy53qSyCF2zMUXJu5smFB9FORus8JqQhMkC=1Gw@mail.gmail.com
Whole thread Raw
In response to Re: Inconsistent results with libc sorting on Windows  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Responses Re: Inconsistent results with libc sorting on Windows
List pgsql-hackers
On Wed, Jun 14, 2023 at 10:50 PM Juan José Santamaría Flecha
<juanjo.santamaria@gmail.com> wrote:
> Yes, I think the situation is quite similar to what you describe, with its WIN32 peculiarities. Take for example the
attachedprogram, it'll output: 
>
> s1 = s2
> s2 = s3
> s1 > s3
> c1 > c2
> c2 > c3
> c1 > c3
>
> As you can see the test for CompareStringEx() is broken, but we get a sane answer with LCMapStringEx().

Given that the documented behaviour is that ".. the sort key produces
the same order as when the source string is used in CompareString or
CompareStringEx"[1], this seems like a reportable bug, unless perhaps
your test program is hiding an error with that default case you have.

[1] https://learn.microsoft.com/en-us/windows/win32/intl/handling-sorting-in-your-applications



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [17] collation provider "builtin"
Next
From: Tom Dunstan
Date:
Subject: Re: Do we want a hashset type?