Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] Case insensitive LIKE ?

From: "D'Arcy" "J(dot)M(dot)" Cain <darcy(at)druid(dot)net>
To: teo(at)flex(dot)ro (Constantin Teodorescu)
Cc: hannu(at)tm(dot)ee, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] Case insensitive LIKE ?
Date: 1999-10-31 13:29:51
Message-ID: m11hv3P-0000bFC@druid.net (view raw or flat)
Thread:
Lists: pgsql-interfaces
Thus spake Constantin Teodorescu
> Hannu Krosing wrote:
> >  select * from t where lower(name) like 'john%';
> Yes, it may work, but probably lower(name) won't work on ODBC->MS Access

Don't know about the M$ issue but if you do use the above you may want to
do the following to speed things up.

CREATE INDEX lower_name ON t (LOWER(name) text_ops);

A simple index on name won't help in the above query.

-- 
D'Arcy J.M. Cain <darcy(at){druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.

In response to

pgsql-interfaces by date

Next:From: Wim CeulemansDate: 1999-10-31 16:31:08
Subject: Re: [INTERFACES] Case insensitive LIKE ?
Previous:From: Hannu KrosingDate: 1999-10-31 12:54:32
Subject: Re: [INTERFACES] Case insensitive LIKE ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group