From: | Hannu Krosing <hannu(at)tm(dot)ee> |
---|---|
To: | Constantin Teodorescu <teo(at)flex(dot)ro> |
Cc: | PostgreSQL Interfaces <pgsql-interfaces(at)postgresql(dot)org> |
Subject: | Re: [INTERFACES] Case insensitive LIKE ? |
Date: | 1999-10-31 12:54:32 |
Message-ID: | 381C3C08.DF980E4@tm.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | D'Arcy J.M. Cain | 1999-10-31 13:29:51 | Re: [INTERFACES] Case insensitive LIKE ? |
Previous Message | Hannu Krosing | 1999-10-31 12:35:47 | Re: [INTERFACES] Case insensitive LIKE ? |