X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BBC765289A for ; Mon, 23 May 2005 17:04:58 -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 95800-06 for ; Mon, 23 May 2005 20:04:49 +0000 (GMT) Received: from joeconway.com (wsip-24-249-201-67.sd.sd.cox.net [24.249.201.67]) by svr1.postgresql.org (Postfix) with ESMTP id 3911F52817 for ; Mon, 23 May 2005 17:04:48 -0300 (ADT) Received: from [192.168.4.1] (account jconway [192.168.4.1] verified) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 2858964; Mon, 23 May 2005 14:02:37 -0700 Message-ID: <42923762.7010708@joeconway.com> Date: Mon, 23 May 2005 13:04:50 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050328 Fedora/1.7.6-1.2.5 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Markus Bertheau Cc: pgsql-sql@postgresql.org Subject: Re: ARRAY() returning NULL instead of ARRAY[] resp. {} References: <1116873219.7306.0.camel@localhost.localdomain> In-Reply-To: <1116873219.7306.0.camel@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.153 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200505/192 X-Sequence-Number: 21505 Markus Bertheau wrote: > why does SELECT ARRAY(SELECT 1 WHERE FALSE) return NULL instead of > ARRAY[] resp. '{}'? > Why would you expect an empty array instead of a NULL? NULL is what you'd get for other data types -- for example: regression=# SELECT (SELECT 1 WHERE FALSE) IS NULL; ?column? ---------- t (1 row) Joe