Re: Case Insensitive searches

From: Terry Lee Tucker <terry(at)chosen-ones(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Case Insensitive searches
Date: 2008-08-04 14:13:53
Message-ID: 200808041013.53520.terry@chosen-ones.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Monday 04 August 2008 10:05, Richard Broersma wrote:
> On Mon, Aug 4, 2008 at 6:54 AM, Mike Gould <mgould(at)allcoast(dot)net> wrote:
> >In some db's if you
> > use a lower() or upr() it will always do a table scan instead of using a
> > index
>
> True, this would also happen in PostgreSQL. However, you can overcome
> this by creating a "functional" index:
>
> http://www.postgresql.org/docs/8.3/interactive/indexes-expressional.html
>
> This way all expression using where lower( column ) = 'a'. will always
> use an index scan.
>
>
> --

What about using the operator, ~* ?

Does that cause a table scan as well?
--
Terry Lee Tucker
Turbo's IT Manager
Turbo, division of Ozburn-Hessey Logistics
2251 Jesse Jewell Pkwy NE
Gainesville, GA 30501
Tel: (336) 372-6812 Fax: (336) 372-6812 Cell: (336) 404-6987
terry(at)turbocorp(dot)com
www.turbocorp.com

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Frank Bax 2008-08-04 15:09:00 Re: Case Insensitive searches
Previous Message Richard Broersma 2008-08-04 14:05:25 Re: Case Insensitive searches