Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biG17-00063J-1l for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Sep 2016 07:14:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1biG16-0001Ov-Ki for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Sep 2016 07:14:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1biG0S-0000gb-BZ for pgsql-bugs@postgresql.org; Fri, 09 Sep 2016 07:13:48 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1biG0P-0005HR-KK for pgsql-bugs@postgresql.org; Fri, 09 Sep 2016 07:13:47 +0000 Received: from localhost ([127.0.0.1]:40411 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1biG0M-0007CQ-4P; Fri, 09 Sep 2016 07:13:42 +0000 From: Andrew Gierth To: Shay Rojansky Cc: Tom Lane , pgsql-bugs@postgresql.org Subject: Re: Array dimension lost if dimension length is zero In-Reply-To: (Shay Rojansky's message of "Fri, 9 Sep 2016 06:51:40 +0000") Message-ID: <874m5pzgy1.fsf@news-spur.riddles.org.uk> References: <19962.1473355922@sss.pgh.pa.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) Date: Fri, 09 Sep 2016 08:13:41 +0100 MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -3.2 (---) 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 >>>>> "Shay" == Shay Rojansky writes: >> This is intentional: all empty arrays are alike, with zero >> dimensions (not one dimension, but none). Shay> Also, note that when reading an empty array in binary encoding, Shay> the dimension field contains one. Nope: postgres=# select array_send('{}'::integer[]); array_send ---------------------------- \x000000000000000000000017 (that's ndim=00000000, flags=00000000, element_oid=00000017) -- Andrew (irc:RhodiumToad) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs