BUG #4999: select 'a' < 'A' is true, but should be false . . .

Поиск
Список
Период
Сортировка
От Brian Ceccarelli
Тема BUG #4999: select 'a' < 'A' is true, but should be false . . .
Дата
Msg-id 200908202024.n7KKOrPp030815@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4999: select 'a' < 'A' is true, but should be false . . .  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: BUG #4999: select 'a' < 'A' is true, but should be false . . .  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      4999
Logged by:          Brian Ceccarelli
Email address:      ceccareb@talussoftware.com
PostgreSQL version: 8.4.0 to 8.2.13
Operating system:   Linux and XP
Description:        select 'a' < 'A' is true, but should be false . . .
Details:

since the < and > comparison operators seem to be case insensitive:

select 'a' < 'Z';    -- true
select 'a' < 'z';    -- true
select 'A' < 'Z';    -- true
select 'A' < 'z';    -- true

select 'z' < 'A';    -- false
select 'z' < 'a';    -- false
select 'Z' < 'A';    -- false
select 'Z' < 'a';    -- false

Any case A is < any case Z implies case-insensitive compare.    Which would
imply that 'a' = 'A', but 'a' < 'A' is true.

- - -

The operator equals is case sensitive.
The operator < and > are case-insensitive.
This is not consistent.

Most of the time, operator < and > are case-insenstive, until you compare
the upper and lower cases of the same letter.

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

Предыдущее
От: "Dmitry Samokhin"
Дата:
Сообщение: Re: BUG #4997: Expression evaluation rules
Следующее
От: "Brian Ceccarelli"
Дата:
Сообщение: BUG #5000: Optimizer does not use function-based index for an order by