Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alain TESIO" <tesio(at)easynet(dot)fr>
Cc: "PGSQL Bugs" <pgsql-bugs(at)postgreSQL(dot)org>
Subject: Re: [BUGS] Equal test on strings doesn't ignore trailing spaces if the function 'lower' is applied
Date: 1999-12-27 16:00:38
Message-ID: 26225.946310438@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Alain TESIO" <tesio(at)easynet(dot)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

In response to

pgsql-bugs by date

Next:From: Tomas CerhaDate: 1999-12-28 20:09:15
Subject: INET operators and NOT
Previous:From: Tom LaneDate: 1999-12-27 15:52:43
Subject: Re: [BUGS] Always one row with group by / agregate

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group