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 6D0C1D1B181 for ; Mon, 28 Jun 2004 13:26:34 -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 63591-08 for ; Mon, 28 Jun 2004 16:26:30 +0000 (GMT) Received: from joeconway.com (66-146-172-86.skyriver.net [66.146.172.86]) by svr1.postgresql.org (Postfix) with ESMTP id 65475D1B23E for ; Mon, 28 Jun 2004 13:26:29 -0300 (ADT) Received: from [206.19.64.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 1876071; Mon, 28 Jun 2004 09:18:31 -0700 Message-ID: <40E046B3.2070603@joeconway.com> Date: Mon, 28 Jun 2004 09:26:27 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Markus Bertheau Cc: pgsql-sql@postgresql.org Subject: Re: Empty array IS NULL? References: <1088438514.3239.97.camel@dicaprio.akademie1.de> In-Reply-To: <1088438514.3239.97.camel@dicaprio.akademie1.de> 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.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/271 X-Sequence-Number: 18216 Markus Bertheau wrote: > is the empty array representable in PostgreSQL, and is it > distinguishable from NULL? Yes, and yes. regression=# select '{}'::int[]; int4 ------ {} (1 row) regression=# select NULL::int[]; int4 ------ (1 row) Since NULL array elements are not currently supported, attempting to construct an array with a NULL element results in NULL, not an empty array. Joe