Equal test on strings doesn't ignore trailing spaces if the function 'lower' is applied

Поиск
Список
Период
Сортировка
От Alain TESIO
Тема Equal test on strings doesn't ignore trailing spaces if the function 'lower' is applied
Дата
Msg-id 00c901bf5032$82fa6ca0$df5f72c3@atesio
обсуждение исходный текст
Ответы Re: [BUGS] Equal test on strings doesn't ignore trailing spaces if the function 'lower' is applied  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
I have to apply rtrim explicitely if the string to
compare has been converted to lowercase :


dip=> create table testlower ( t char(50) );
CREATE
dip=> insert into testlower values ( 'Aa' );
INSERT 1257077 1
dip=> select t from testlower where t='Aa';
t
--------------------------------------------------
Aa
(1 row)
dip=> select t from testlower where lower(t)='aa';
t
-
(0 rows)
dip=> select t from testlower where rtrim(lower(t))='aa';
t
--------------------------------------------------
Aa
(1 row)



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

Предыдущее
От: "Alain TESIO"
Дата:
Сообщение: Always one row with group by / agregate
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] Always one row with group by / agregate