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 1720052879 for ; Mon, 23 May 2005 15:53:05 -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 75381-02 for ; Mon, 23 May 2005 18:52:55 +0000 (GMT) Received: from srv04.flexidesk.de (h97696.serverkompetenz.net [81.169.138.170]) by svr1.postgresql.org (Postfix) with ESMTP id 80B9552817 for ; Mon, 23 May 2005 15:52:54 -0300 (ADT) Received: from p54bd4d2e.dip.t-dialin.net ([84.189.77.46] ident=s5vs9fbip6n73hqk) by srv04.flexidesk.de with asmtp (Cipher TLSv1:RC4-MD5:128) (Exim 3.35 #1 (Debian)) id 1DaHtH-0004Gj-00; Mon, 23 May 2005 20:43:04 +0200 Message-ID: <429226CF.4090207@monso.de> Date: Mon, 23 May 2005 18:54:07 +0000 From: "Jan B." User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050514) 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=ISO-8859-1; 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/190 X-Sequence-Number: 21503 Markus Bertheau wrote: > Hi, > > why does SELECT ARRAY(SELECT 1 WHERE FALSE) return NULL instead of > ARRAY[] resp. '{}'? > > Markus > Perhaps Arrays always have to contain at least one element? (I don't know for sure.) SELECT array[]; ERROR: syntax error at or near "]" at character 14 LINE 1: SELECT array[]; SELECT array[1]; array ------- {1} (1 row)