Re: [INTERFACES] Case insensitive LIKE ?

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: [INTERFACES] Case insensitive LIKE ?
Дата
Msg-id 381C3C08.DF980E4@tm.ee
обсуждение исходный текст
Ответ на Case insensitive LIKE ?  (Constantin Teodorescu <teo@flex.ro>)
Список pgsql-interfaces
Constantin Teodorescu wrote:
> 
> Hannu Krosing wrote:
> >
> > Constantin Teodorescu wrote:
> > >
> > > Is there for PostgreSQL a modifier(parameter) that will make the LIKE
> > > clause case insensitive ?
> >
> > Maybe
> >
> >  select * from t where lower(name) like 'john%';
> 
> Yes, it may work, but probably lower(name) won't work on ODBC->MS Access
> ...

It is much more likely to work than ~* , the case-insensitive regex op.

But to make it use indexes (for the exact case above) you should also create 
index on lower(name).

> I would like to preserve also the SQL commands betwen versions and not
> to fill my program with IF's ..

I doubt that case-insensitive like is in any standard.

Could someone look it up in SQL92 spec ?

------------
Hannu


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

Предыдущее
От: Constantin Teodorescu
Дата:
Сообщение: Re: [INTERFACES] Case insensitive LIKE ?
Следующее
От: "D'Arcy" "J.M." Cain
Дата:
Сообщение: Re: [INTERFACES] Case insensitive LIKE ?