Re: BUG #14885: mistake in sorting win1251 chars

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: k(dot)daskalov(dot)911(at)gmail(dot)com
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14885: mistake in sorting win1251 chars
Date: 2017-11-02 15:38:53
Message-ID: CA+bJJbymE-hJAYVd9Pt8CsfmN+bTC51gOW6WU_2Kr8icEM50Bg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Nov 2, 2017 at 10:57 AM, <k(dot)daskalov(dot)911(at)gmail(dot)com> wrote:
> Here is a small example:
> "АЙГЕР"
> "АИКО"
> "АЙКОН"

Are you sure it's sorting badly? In some collations some letters sort
equally, you should try:

"АИКО"
"АЙКОН"
and
"АИКОH"
"АЙКО"

as "И" may be sorting in the same place as "Й" and it is deciding by the tails.

It happens in spanish with the tildes ( a and à sort in the same
place, so unless they are the only difference order depends on aht is
around:
test=> select * from ( values ('a'),('à'),('ay'),('àx'),('za'),('zà')
) x order by 1;
column1
---------
a
à
àx
ay
za

(6 rows)
)

Doing something like this with your alphabet may shed some light on the issue.

(note, this was done with locale en_US.utf-8 )

Francisco Olarte.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kalin Daskalov 2017-11-02 17:27:43 Re: BUG #14885: mistake in sorting win1251 chars
Previous Message Tomas Vondra 2017-11-02 13:48:35 Re: BUG #14885: mistake in sorting win1251 chars