Re: BUG #14112: sorting v and w is broken with et_EE locate

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: georg(dot)kahest(at)internet(dot)ee
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14112: sorting v and w is broken with et_EE locate
Date: 2016-04-28 04:07:57
Message-ID: CAEepm=37HtY+jwoXxQ07kXX2Kwk3WmMbW9Y=nXda00qq=MmENQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Apr 26, 2016 at 2:37 AM, <georg(dot)kahest(at)internet(dot)ee> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14112
> Logged by: Georg Kahest
> Email address: georg(dot)kahest(at)internet(dot)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(at)yoga:~/junk$ locale -a | grep et_EE
et_EE
et_EE.iso885915
et_EE.utf8
munro(at)yoga:~/junk$ cat input
a1.ee
vvbwjbln7.ee
vyz.ee
wwvl8.ee
wxxezi6lkaq7eoi.ee
munro(at)yoga:~/junk$ LC_COLLATE=et_EE.utf8 sort < input
a1.ee
vvbwjbln7.ee
wwvl8.ee
wxxezi6lkaq7eoi.ee
vyz.ee
munro(at)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2016-04-28 04:22:59 Re: BUG #14112: sorting v and w is broken with et_EE locate
Previous Message David G. Johnston 2016-04-28 04:03:56 Re: BUG #14110: information_schema.constraint_column_usage not working as expected