X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DEFFEDA60D for ; Wed, 19 Oct 2005 17:35:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24628-04 for ; Wed, 19 Oct 2005 20:35:39 +0000 (GMT) Received: from mail.greatgulfhomes.com (mail.greatgulfhomes.com [216.191.52.66]) by svr1.postgresql.org (Postfix) with ESMTP id A5366DA5A6 for ; Wed, 19 Oct 2005 17:35:39 -0300 (ADT) Received: from [10.243.102.72] ([216.191.52.74]) (authenticated bits=0) by mail.greatgulfhomes.com (8.12.8/8.12.8) with ESMTP id j9JKXgPT029302; Wed, 19 Oct 2005 16:33:44 -0400 Message-ID: <4356AF8C.80709@ashtonwoodshomes.com> Date: Wed, 19 Oct 2005 16:41:48 -0400 From: Terry Fielder User-Agent: Mozilla Thunderbird 1.0.5 (Windows/20050711) X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-2?Q?Havasv=F6lgyi_Ott=F3?= Cc: pgsql-sql@postgresql.org Subject: Re: NULL in IN clause References: <00cc01c5d00b$3a67dc70$1102a8c0@dream> <1129681803.15546.21.camel@state.g2switchworks.com> <001a01c5d4ea$243a1830$6400a8c0@OTTO> In-Reply-To: <001a01c5d4ea$243a1830$6400a8c0@OTTO> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.025 required=5 tests=[AWL=0.025] X-Spam-Level: X-Archive-Number: 200510/225 X-Sequence-Number: 23078 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