Re: BUG #2126: Index usage for function value

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2126: Index usage for function value
Дата
Msg-id 23098.1135697052@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #2126: Index usage for function value  ("Grzegorz Tańczyk" <goliatus@polzone.pl>)
Список pgsql-bugs
"Grzegorz TaÅczyk" <goliatus@polzone.pl> writes:
> SELECT * FROM table WHERE id = myfunction('x', 10);
> There is an index created on id column, but query planner doesn't use it.

Have you declared myfunction as IMMUTABLE or STABLE?  If it's volatile
then optimizing to an indexscan is incorrect and the planner won't do it.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2127: Regular Expression Limits Do Not Work
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2125: SELECT problem with strings containing \