Re: Case insensitivity, and option? - Mailing list pgsql-hackers

From ow
Subject Re: Case insensitivity, and option?
Date
Msg-id 20030323132119.73012.qmail@web21401.mail.yahoo.com
Whole thread Raw
In response to Case insensitivity, and option?  (mlw <pgsql@mohawksoft.com>)
List pgsql-hackers
> select * from table where field ILIKE 'blAH';  -- ;-)
> is almost as easy :-)
> PS: no, don't do this if you want portability. I think the charset
> idea's a better one.
>
> Ron

�select * from table where lower(field)=lower('BLah')� will break
portability too in the sense that many DBs (perhaps all commercial
ones) do not support functional indexes. Hence
�lower(field)=lower('BLah')� query will not be using index when it runs
on those DBs.

Besides, the developer must always remember to use conversion when
writing queries. This does not sound bad initially but in a big
application with many developers and complex query logic this will
create quite a few annoying, time consuming and difficult to find bugs.

Case insensitive charset definitely sounds like a better idea. Has
anyone done this yet? IMHO, this should be a part of core distribution
since 99.999999% of queries do not need case sensitivity.

Thanks


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: regproc's lack of certainty is dangerous
Next
From: Chris Gamache
Date:
Subject: Re: [GENERAL] Extracting time from timestamp