Re: BUG #4974: Equivalent of "= ANY" and "BETWEEN" not observed by planner.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4974: Equivalent of "= ANY" and "BETWEEN" not observed by planner.
Дата
Msg-id 2814.1250043319@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4974: Equivalent of "= ANY" and "BETWEEN" not observed by planner.  ("Ian Turner" <ian.turner@deshaw.com>)
Ответы Re: BUG #4974: Equivalent of "= ANY" and "BETWEEN" not observed by planner.  (Greg Stark <gsstark@mit.edu>)
Список pgsql-bugs
"Ian Turner" <ian.turner@deshaw.com> writes:
> The following queries are equivalent, because there are no integers between
> 5 and 6 and because the BETWEEN operator contemplates a closed range.
> SELECT * FROM example WHERE pk IN (5,6);
> SELECT * FROM example WHERE pk BETWEEN 5 AND 6;

The planner intentionally does not do very many inferences that are as
datatype-dependent as this one would be.  It doesn't fit into the system
design.  For the most part the possible gain is not large anyway.

            regards, tom lane

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

Предыдущее
От: "Ian Turner"
Дата:
Сообщение: BUG #4974: Equivalent of "= ANY" and "BETWEEN" not observed by planner.
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Connections closed unexpectedly