From: | ow <oneway_111(at)yahoo(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Case insensitivity, and option? |
Date: | 2003-03-23 13:21:19 |
Message-ID: | 20030323132119.73012.qmail@web21401.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Gamache | 2003-03-23 16:01:13 | Re: [HACKERS] Extracting time from timestamp |
Previous Message | Tom Lane | 2003-03-23 05:24:34 | Re: regproc's lack of certainty is dangerous |