Case Insensitive Queries

Поиск
Список
Период
Сортировка
От Dan Lyke
Тема Case Insensitive Queries
Дата
Msg-id 15123.54390.703981.375120@wynand.flutterby.com
обсуждение исходный текст
Ответ на Case Insensitive Queries  (Mark <mark@zserve.com>)
Список pgsql-sql
Mark writes:
> Is it possible to execute a query using a where clause that allows case
> insensitive comparison between a field and text.

select * from account where upper(username) = upper('test')

(Upper used because, as has been remarked on this list and in other places,
folding from richer character sets is likely to get better matches this way).

And yes, you can create an index on upper(fieldname).

Dan


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

Предыдущее
От: Manessinger Andreas
Дата:
Сообщение: AW: Case Insensitive Queries
Следующее
От: "Joe Conway"
Дата:
Сообщение: Re: Case Insensitive Queries