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:02:38
Message-ID: 26422.992444558@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:
> I thought NOT IN was the only one that was concerned about any NULL?

No, they both are: in the presence of NULLs, IN can return TRUE or NULL,
NOT IN can return FALSE or NULL.

The reason the FAQ is always about NOT NULL is that WHERE treats NULL as
FALSE, so the average newbie writing an IN doesn't even realize he's
getting a NULL rather than a FALSE. With NOT NULL, he can't ignore it.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-06-13 15:09:09 Re: Re: Does PostgreSQL support EXISTS?
Previous Message Thalis A. Kalfigopoulos 2001-06-13 14:59:30 Multiple pq_flush: send() failed: Broken pipe