Re: Case insensitivity, and option?

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: Case insensitivity, and option?
Дата
Msg-id 1047491946.55840.8.camel@jester
обсуждение исходный текст
Ответ на Re: Case insensitivity, and option?  (pgsql@mohawksoft.com)
Список pgsql-hackers
On Wed, 2003-03-12 at 12:57, pgsql@mohawksoft.com wrote:
> >
> >
> > --le 12/03/2003 09:03 -0500, mlw écrivait :
> > | I was at a client office reviewing some code. They use MSSQL and I |
> > noticed that:
> > |
> > | select * from table where field = 'blah';
> > | gave the same results as:
> > | select * from table where field = 'BLah';
> > |
> > | I was shocked. (a) because I know a lot of my code could be easier to
> > | write, and (b) that their code would break on every other database I
> > am | aware of. Does anyone know about this?
> > |
> > | Is it practical/desirable for PostgreSQL to have this as a
> > configuration | setting?
> >
> > Well, I quite don't see any difference with writing :
> >select * from table where lower(field) = lower('BLah');
>
> That would probably require an extra index, especially if 'field' is a
> primary key.

I don't know about MSSql, but on MySQL you also require a different
index for a case sensitive comparison. Problem is, they don't (didn't)
support functional indexes -- so you simply couldn't make one.

End up with: WHERE field = 'var' and strcasecmp(field, 'var') everywhere

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

В списке pgsql-hackers по дате отправления:

Предыдущее
От: pgsql@mohawksoft.com
Дата:
Сообщение: Re: Case insensitivity, and option?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Roadmap for FE/BE protocol redesign