On Tue, Apr 26, 2016 at 2:37 AM, <georg.kahest@internet.ee> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14112
> Logged by: Georg Kahest
> Email address: georg.kahest@internet.ee
> PostgreSQL version: 9.4.7
> Operating system: Debian Jessie
> Description:
>
> It seems that sorting v and w with et_EE locate is broken (other chars seem
> to be okey):
>
> select name COLLATE "et_EE" from test order by name;
> name
> --------------------
> a1.ee
> vvbwjbln7.ee
> wwvl8.ee
> wxxezi6lkaq7eoi.ee
> vyz.ee
> (5 rows)
>
>
> select name COLLATE "en_US" from test order by name;
> name
> --------------------
> a1.ee
> vvbwjbln7.ee
> vyz.ee
> wwvl8.ee
> wxxezi6lkaq7eoi.ee
> (5 rows)
That does look odd. If that's not the correct way to sort Estonian,
then that should probably be reported to the Debian glibc maintainers
(or maybe the glibc project). Here's a Debian Jessie box
demonstrating that behaviour without any help from PostgreSQL:
munro@yoga:~/junk$ locale -a | grep et_EE
et_EE
et_EE.iso885915
et_EE.utf8
munro@yoga:~/junk$ cat input
a1.ee
vvbwjbln7.ee
vyz.ee
wwvl8.ee
wxxezi6lkaq7eoi.ee
munro@yoga:~/junk$ LC_COLLATE=et_EE.utf8 sort < input
a1.ee
vvbwjbln7.ee
wwvl8.ee
wxxezi6lkaq7eoi.ee
vyz.ee
munro@yoga:~/junk$ LC_COLLATE=en_US.utf8 sort < input
a1.ee
vvbwjbln7.ee
vyz.ee
wwvl8.ee
wxxezi6lkaq7eoi.ee
--
Thomas Munro
http://www.enterprisedb.com