Re: Re: Does PostgreSQL support EXISTS?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Re: Does PostgreSQL support EXISTS?
Date: 2001-06-13 15:26:38
Message-ID: 26506.992445998@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message postgres 2001-06-13 15:34:40 Re: ORDER BY what?
Previous Message Peter Eisentraut 2001-06-13 15:25:23 Re: 7.1.2 temporary file area