BUG #1027: incorrect result from 'order by'

Поиск
Список
Период
Сортировка
От PostgreSQL Bugs List
Тема BUG #1027: incorrect result from 'order by'
Дата
Msg-id 20031224185143.4A086CF8772@www.postgresql.com
обсуждение исходный текст
Ответы Re: BUG #1027: incorrect result from 'order by'  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1027
Logged by:          William H Copson

Email address:      copson@u.arizona.edu

PostgreSQL version: 7.5 Dev

Operating system:   Redhat 7.2 (highly modified)

Description:        incorrect result from 'order by'

Details:

The following:

drop table tst;
create table tst (
name varchar(25));
insert into tst values ('LEE,ADAM');
insert into tst values ('LEEBERMAN,JOHN');
insert into tst values ('LEE,RALPH');
select name from tst order by name;

Produces the following output:

DROP TABLE
CREATE TABLE
INSERT 3307587 1
INSERT 3307588 1
INSERT 3307589 1
      name
----------------
 LEE,ADAM
 LEEBERMAN,JOHN
 LEE,RALPH
(3 rows)

Expected output:
      name
----------------
 LEE,ADAM
 LEE,RALPH
 LEEBERMAN,JOHN
(3 rows)

I have tried databases with SQL_ASCII, LATIN1 and LATIN2
encoding with the same result.
From this small example and others involving an employee
table (80K+ records) it appears that the comma is being
parsed out prior to the sort (i.e. 'LEEB' sorts after
'LEEA' and before 'LEER').

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tammy Jones
Дата:
Сообщение: Re: [JDBC] BUG #1026: org.apache.commons.dbcp.DbcpException:
Следующее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1028: order by problem