On 27.07.21 19:07, Marc Millas wrote:
so, obviously, both lc_collate knows about the é
but obviously, too, they do behave differently on the impact of the
beginning white space.
I didn't see anything about this behaviour on the doc, unless the
reference at the libc should be understood as please read and test libc
doc on each platform.
So my first question is: why ?
My second question is: how to make the centos postgres behave like the
w10 one ??
ie. knowing about french characters AND taking beginning white spaces
into account ?
There are multiple standard ways to deal with space and punctuation
characters when sorting. See
<https://unicode-org.github.io/icu/userguide/collation/customization/ignorepunct.html>
for a description. Not all collation providers implement all of them,
but the behavior you happen to get is usually one of them. The centos 7
behavior corresponds to "shift-trimmed", the Windows one appears to
match "non-ignorable". If you want to get that latter one on Linux as
well, you can use the ICU locales, which also default to non-ignorable.
For example
select * from test order by ble collate "fr-x-icu";
matches your Windows output for me.