Re: possible bug in 8.4

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: possible bug in 8.4
Дата
Msg-id 18343.1229627618@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: possible bug in 8.4  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: possible bug in 8.4  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> I think Postgres can't do better because there could be a NULL in the
> subquery. If there's a NULL in the subquery then no record would match.

Yeah.  NOT IN does not have the right semantics to become an antijoin.

FWIW, you can use a NOT EXISTS:

select a.a from a where not exists (select 1 from b where a.a = b.a);

In HEAD this should give the identical plan to the leftjoin/is null
hack.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Reducing some DDL Locks to ShareLock
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: possible bug in 8.4