Re: BUG #6079: Wrong select result

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #6079: Wrong select result
Дата
Msg-id 17006.1309391146@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #6079: Wrong select result  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-bugs
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
>> 2011/6/28 Renat <renat.nasyrov@itv.ru>:
>>> select * from foo where date_to is null and date_to > '2011-01-01'
>>> Expected: 0 rows
>>> But: it return 1 row with id=2

> The problem seems to be in _bt_preprocess_keys(), which discards the
> "a > 10000" predicate in favour of the "a is null" predicate on the
> grounds that "null > 10000" in a nulls-last index.

> It looks like a previous revision had the right check, based on the
> logic that x IS NULL is incompatible with any other predicate.

Yeah, seems to be my fault :-(.  Will fix.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6082: server segfault - pg_stat_reset_shared(null)
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: BUG #6084: When Updating Tables with Select Into