Peter Geoghegan <pg@heroku.com> writes:
> At one point, Robert wrote a small self-contained tool to show OS
> strxfrm() blobs:
> http://www.postgresql.org/message-id/CA+TgmoaOCyQpo8HK9yr6VTuyknWWvqgo7JeXi2kb=gpNveKR+g@mail.gmail.com
> It would be great if you showed us the output for your test case
> strings, both on an affected and on an unaffected system.
On RHEL6, I get
./strxfrm-binary de_DE.UTF-8 'eai' 'e aÃ'
"eai" -> 100c140108080801020202 (11 bytes)
"e aÃ" -> 100c140108080901020202010235 (14 bytes)
This seems a bit problematic, because these string sort in the other
order ("e aÃ" before "eai") according to sort(1) as well as Postgres
sorting code.
It's possible I've copied-and-pasted these multibyte characters wrong.
But if I haven't, this says that the strxfrm-based optimization is
unusably broken on a very large fraction of reasonably-modern
installations. Quite aside from casting aspersions on the glibc guys,
how did we fail to notice this in our own testing?
regards, tom lane