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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: 2Q: Vacuuming and making queries case insensitive



"Sean Davis" <sdavis2(at)mail(dot)nih(dot)gov> writes:
> On Jan 27, 2008 8:07 PM, sdger erger <killen(dot)nextdoor(at)gmail(dot)com> wrote:
>> I also wonder if it is possible to make command line searches case
>> insensitive? Like when I write WHERE name='PHIL' I want it to be the same as
>> WHERE name='phil'.

> where name ilike 'phil'.

Probably better: WHERE lower(name) = lower('PHIL')
since this has some chance of using an index (you'd need an index on
lower(name)).  ILIKE is basically dead in the water for indexing.

If you're desperate not to change your queries that way, look for citext
on pgfoundry.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group