Re: Case insensitivity, and option?

Поиск
Список
Период
Сортировка
От ow
Тема Re: Case insensitivity, and option?
Дата
Msg-id 20030323132119.73012.qmail@web21401.mail.yahoo.com
обсуждение исходный текст
Ответ на Case insensitivity, and option?  (mlw <pgsql@mohawksoft.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: regproc's lack of certainty is dangerous
Следующее
От: Chris Gamache
Дата:
Сообщение: Re: [GENERAL] Extracting time from timestamp