pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Terry Fielder <terry@ashtonwoodshomes.com>
To: Havasvölgyi Ottó <h.otto@freemail.hu>
Cc: pgsql-sql@postgresql.org
Subject: Re: NULL in IN clause
Date: Wed, 19 Oct 2005 16:41:48 -0400
Message-ID: <4356AF8C.80709@ashtonwoodshomes.com> (raw)
In-Reply-To: <001a01c5d4ea$243a1830$6400a8c0@OTTO>
References: <00cc01c5d00b$3a67dc70$1102a8c0@dream>
	<1129681803.15546.21.camel@state.g2switchworks.com>
	<001a01c5d4ea$243a1830$6400a8c0@OTTO>



Havasvölgyi Ottó wrote:
> Hi,
> 
> I have just run this command on 8.0.4 :
> 
> SELECT 'foo' WHERE 0 NOT IN (NULL, 1);

0 <> NULL   (Indeed nothing equals NULL, other then sometimes NULL itself)

0 <> 1

Therefore, the statement: 0 NOT IN (NULL, 1)
Should always equate to false.

Therefore No rows returned.  Ever.

Terry
> 
> And it resulted is zero rows.
> Without NULL it is OK.
> Is this a bug, or the standard has such a rule?
> 
> Best Regards,
> Otto
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
> 
>               http://archives.postgresql.org
> 

-- 
Terry Fielder
terry@greatgulfhomes.com
Associate Director Software Development and Deployment
Great Gulf Homes / Ashton Woods Homes
Fax: (416) 441-9085



view thread (5+ messages)  latest in thread

Message-ID: <4356AF8C.80709@ashtonwoodshomes.com>
Permalink:  ../4356AF8C.80709@ashtonwoodshomes.com/
Also on:    postgresql.org/message-id/4356AF8C.80709@ashtonwoodshomes.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: terry@ashtonwoodshomes.com, h.otto@freemail.hu
  Subject: Re: NULL in IN clause
  In-Reply-To: <4356AF8C.80709@ashtonwoodshomes.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox