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

From: "Alain TESIO" <tesio(at)easynet(dot)fr>
To: "PGSQL Bugs" <pgsql-bugs(at)postgresql(dot)org>
Subject: Equal test on strings doesn't ignore trailing spaces if the function 'lower' is applied
Date: 1999-12-27 06:18:12
Message-ID: 00c901bf5032$82fa6ca0$df5f72c3@atesio
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 1999-12-27 15:52:43 Re: [BUGS] Always one row with group by / agregate
Previous Message Alain TESIO 1999-12-27 06:12:45 Always one row with group by / agregate