Re: Re: Does PostgreSQL support EXISTS?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: Does PostgreSQL support EXISTS?
Дата
Msg-id 26506.992445998@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Re: Does PostgreSQL support EXISTS?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Re: Does PostgreSQL support EXISTS?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Got it.  How does an IN subquery returning NULL behave differently from
> one returning FALSE?  I can't think of a test that would be affected.

After we fix IS TRUE and friends to respond to nulls correctly (Conway's
promised to do that, IIRC) it'll be possible to write

    (foo IN (SELECT ...)) IS NOT FALSE

and get the "intuitive" behavior.  But right now that doesn't work.

Hm.  Maybe we could recognize that construct as a whole, and translate
it to an optimizable join?  It'd become the usual locution, I imagine.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Re: Does PostgreSQL support EXISTS?
Следующее
От: Lamar Owen
Дата:
Сообщение: Re: Re: [SQL] ORDER BY what?