Re: ORDER BY case insensitive?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ORDER BY case insensitive?
Дата
Msg-id 3175.1002241928@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ORDER BY case insensitive?  (Keith Gray <keith@heart.com.au>)
Список pgsql-sql
Keith Gray <keith@heart.com.au> writes:
> How would PostgreSQL know to use the index
> MyTable_lower_idx when I do a ...

> SELECT * FROM MyTable WHERE lower(name) LIKE 'jas%';

The same way it knows to use any other index: it matches up the things
mentioned in the WHERE clause with the available indexes, and then sees
whether the clauses they are mentioned in are comparisons that the index
can help with.  In this case the "thing" mentioned is "function(column)"
rather than just "column", but otherwise it's just like a simple index.
        regards, tom lane


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

Предыдущее
От: Keith Gray
Дата:
Сообщение: Re: ORDER BY case insensitive?
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: Indexing behavior