=?iso-8859-2?Q?Havasv=F6lgyi_Ott=F3?= <[EMAIL PROTECTED]> writes:
> I have just run this command on 8.0.4 :

> SELECT 'foo' WHERE 0 NOT IN (NULL, 1);

> And it resulted is zero rows.
> Without NULL it is OK.
> Is this a bug, or the standard has such a rule?

This is per spec.

The computation is effectively
        NOT (0 = NULL OR 0 = 1)
        NOT (NULL OR FALSE)
        NOT NULL
        NULL
ie, the result is UNKNOWN, which WHERE treats the same as FALSE.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to