Re: 2Q: Vacuuming and making queries case insensitive

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 2Q: Vacuuming and making queries case insensitive
Дата
Msg-id 16169.1201484966@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 2Q: Vacuuming and making queries case insensitive  ("Sean Davis" <sdavis2@mail.nih.gov>)
Список pgsql-novice
"Sean Davis" <sdavis2@mail.nih.gov> writes:
> On Jan 27, 2008 8:07 PM, sdger erger <killen.nextdoor@gmail.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

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

Предыдущее
От: "Sean Davis"
Дата:
Сообщение: Re: 2Q: Vacuuming and making queries case insensitive
Следующее
От: Decibel!
Дата:
Сообщение: Re: populating arrays with default values