Re: [BUGS] Equal test on strings doesn't ignore trailing spaces if the function 'lower' is applied - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] Equal test on strings doesn't ignore trailing spaces if the function 'lower' is applied
Date
Msg-id 26225.946310438@sss.pgh.pa.us
Whole thread Raw
In response to Equal test on strings doesn't ignore trailing spaces if the function 'lower' is applied  ("Alain TESIO" <tesio@easynet.fr>)
List pgsql-bugs
"Alain TESIO" <tesio@easynet.fr> writes:
> I have to apply rtrim explicitely if the string to
> compare has been converted to lowercase :

lower() is a text function, not a fixed-length-char function,
so the result of lower() is assumed to have significant trailing
blanks.  It's not clear to me that the behavior you're complaining
about is a bug.

I'd suggest using varchar or text if you are dealing with strings
that are actually variable-length.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] Always one row with group by / agregate
Next
From: Tomas Cerha
Date:
Subject: INET operators and NOT