X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5021352864 for ; Mon, 6 Jun 2005 11:55:16 -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 02074-05 for ; Mon, 6 Jun 2005 14:55:07 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id CEB67528DD for ; Mon, 6 Jun 2005 11:55:06 -0300 (ADT) Received: from dicaprio.akademie1.de (dicaprio.akademie1.de [62.165.4.166]) (authenticated) by web11.manitu.net (8.10.2-SOL3/8.10.2) with ESMTP id j56Et3T19544; Mon, 6 Jun 2005 16:55:03 +0200 Subject: Re: [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {} From: Markus Bertheau =?UTF-8?Q?=E2=98=AD?= To: Tom Lane Cc: Joe Conway , pgsql-hackers@postgresql.org In-Reply-To: <25974.1118069089@sss.pgh.pa.us> References: <1116873219.7306.0.camel@localhost.localdomain> <42923762.7010708@joeconway.com> <16774.1116907560@sss.pgh.pa.us> <1118067445.5506.6.camel@dicaprio.akademie1.de> <25974.1118069089@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8 Date: Mon, 06 Jun 2005 16:54:59 +0200 Message-Id: <1118069699.5506.9.camel@dicaprio.akademie1.de> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-4) Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.017 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/238 X-Sequence-Number: 68719 В Пнд, 06/06/2005 в 10:44 -0400, Tom Lane пишет: > Markus Bertheau =?UTF-8?Q?=E2=98=AD?= writes: > > By analogy, array_upper('{}'::TEXT[], 1) should return 0 instead of > > NULL. > > No, that doesn't follow ... we've traditionally considered '{}' to > denote a zero-dimensional array. But array_upper(ARRAY(SELECT 1 WHERE FALSE), 1) should return 0, and array_upper(ARRAY[], 1), when the ARRAY[] syntax is supported, should return 0. Do I get that right? Markus -- Markus Bertheau ☭