Re: BUG #2178: NOT IN command don't work

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Daniel Afonso Heisler <daniel(at)solis(dot)coop(dot)br>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2178: NOT IN command don't work
Date: 2006-01-19 21:40:42
Message-ID: 20060119214042.GA15276@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jan 17, 2006 at 10:00:28PM +0000, Daniel Afonso Heisler wrote:
> When i run the following query, postgreSQL return TRUE.
> # SELECT true WHERE 1 NOT IN (2,3);
>
> But, when i run the next query, it don't return TRUE
> # SELECT true WHERE 1 NOT IN (2,NULL,3);

The expression "1 NOT IN (2,NULL,3)" evaluates to NULL because NULL
means "unknown." This comes up occasionally; see the archives for
past discussion.

http://archives.postgresql.org/pgsql-sql/2005-12/msg00219.php
http://archives.postgresql.org/pgsql-sql/2005-10/msg00227.php

--
Michael Fuhr

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2006-01-19 21:55:26 Re: BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated
Previous Message Tom Lane 2006-01-19 21:37:27 Re: BUG #2180: log_statement=mod does not work