additional message to the bug #7499 - Mailing list pgsql-bugs

From Denis Kolesnik
Subject additional message to the bug #7499
Date
Msg-id CAHYNDb8+t61Y=AtrFnc29whz8tV5Oxu357cBgvtBcJas73diAg@mail.gmail.com
Whole thread Raw
Responses Re: additional message to the bug #7499
Re: additional message to the bug #7499
List pgsql-bugs
I have now VERY strong argument to consider it is as a bug:

if there a understandable for SQL language sequence which sorts
in other fashion when adding "LIMIT".

I did try the same with a last name starting with "G" (there also more
than one entry with identical surnames) and it worked ok(the results
were represented as I waited).

this one last example brings me to conseder it is as a bug.

 id  |    str_last_name
-----+----------------------
  83 | GXXXXXXXXX
 175 | GXXXXXXXXX

and

 id |    str_last_name
----+----------------------
 83 | GXXXXXXXXX
(1 =D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0)

select id, str_last_name from tbl_owners_individual order by
str_last_name offset 26;

and

select id, str_last_name from tbl_owners_individual order by
str_last_name offset 26 limit 1;

corresponding...

and even sorting by id:
select id, str_last_name from tbl_owners_individual where id in
(83,175,111,1) order by str_last_name;

 id  |    str_last_name
-----+----------------------
  83 | GXXXXXXXXX
 175 | GXXXXXXXXX
   1 | Kolesnik
 111 | Kolesnik
(4 =D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B8)

select id, str_last_name from tbl_owners_individual where id in
(83,175,111,1) order by id;

 id  |    str_last_name
-----+----------------------
   1 | Kolesnik
  83 | GXXXXXXXXX
 111 | Kolesnik
 175 | GXXXXXXXXX
(4 =D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B8)

anyway sorted by id results the record with the "1" id appear before
the record with the id "111".

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: BUG #7500: hot-standby replica crash after an initial rsync
Next
From: Chris Travers
Date:
Subject: GROUP BY checks inadequate when set returning functions in column list