array_length of an empty array

From: John R Pierce <pierce(at)hogranch(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: array_length of an empty array
Date: 2012-07-29 08:03:04
Message-ID: 5014EE38.30202@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hmmm. array[]::integer[] is an empty array, {}, eg an array with
zero elements

but array_length(array[]::integer[]) is NULL rather than zero. this
seems counterintuitive.

--
john r pierce N 37, W 122
santa cruz ca mid-left coast

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vincent Veyron 2012-07-29 09:56:16 Re: BI tools and postgresql
Previous Message Edson Richter 2012-07-29 01:24:00 Re: Trim not working (PostgreSQL 9.1.2 on Win64)