Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2P8Z-0000na-9A for pgsql-bugs@arkaria.postgresql.org; Thu, 25 Jul 2013 17:15:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V2P8X-0004a2-VR for pgsql-bugs@arkaria.postgresql.org; Thu, 25 Jul 2013 17:15:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2P8X-0004Zv-1T for pgsql-bugs@postgresql.org; Thu, 25 Jul 2013 17:15:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2P8P-0007r1-Vp for pgsql-bugs@postgresql.org; Thu, 25 Jul 2013 17:15:32 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r6PHFOt0021405; Thu, 25 Jul 2013 13:15:24 -0400 (EDT) From: Tom Lane To: =?ISO-8859-1?Q?L=E1szl=F3_Lajos_J=E1nszky?= cc: pgsql-bugs@postgresql.org Subject: Re: pgsql 8.4 "not" + "is contained by" operators return wrong result In-reply-to: References: Comments: In-reply-to =?ISO-8859-1?Q?L=E1szl=F3_Lajos_J=E1nszky?= message dated "Thu, 25 Jul 2013 18:41:05 +0200" Date: Thu, 25 Jul 2013 13:15:24 -0400 Message-ID: <21403.1374772524@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org =?ISO-8859-1?Q?L=E1szl=F3_Lajos_J=E1nszky?= writes: > The following query returns nothing, but it should return 1. > *SELECT 1 FROM NOT(ARRAY[1] <@ NULL**); * I assume you meant SELECT 1 WHERE NOT(ARRAY[1] <@ NULL) ? Because what you wrote doesn't parse. This is not a bug. "ARRAY[1] <@ NULL" yields NULL. NOT (NULL) is still NULL. WHERE treats a NULL result as FALSE. It might help you to consider that NULL means "unknown". It does not mean "empty array". regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs