Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z2Juq-00037E-To for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Jun 2015 13:50:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z2Juq-0004nn-EZ for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Jun 2015 13:50:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z2Jup-0004nf-Su for pgsql-bugs@postgresql.org; Tue, 09 Jun 2015 13:50:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z2Jum-0001I1-Oh for pgsql-bugs@postgresql.org; Tue, 09 Jun 2015 13:50:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t59Do278029942; Tue, 9 Jun 2015 09:50:02 -0400 From: Tom Lane To: krzysztof.czajka@turcom.pl cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13420: Array function contains with null In-reply-to: <20150609112946.2794.37090@wrigleys.postgresql.org> References: <20150609112946.2794.37090@wrigleys.postgresql.org> Comments: In-reply-to krzysztof.czajka@turcom.pl message dated "Tue, 09 Jun 2015 11:29:46 -0000" Date: Tue, 09 Jun 2015 09:50:02 -0400 Message-ID: <29941.1433857802@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 krzysztof.czajka@turcom.pl writes: > Function contains on array with null element isn't work correctly. > SELECT ARRAY[1,4,3] @> ARRAY[3,1] > true > SELECT ARRAY[ NULL ] @> ARRAY[ NULL ] > false > SELECT ARRAY[ NULL::varchar,'2' ] @> ARRAY[ NULL::varchar ] > false That looks fine to me, because NULL isn't equal to NULL. 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