Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL) - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Date
Msg-id 5153977F.1050104@agliodbs.com
Whole thread Raw
In response to Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)  (Brendan Jurd <direvus@gmail.com>)
List pgsql-hackers
> We already have the ability to define lower bounds other than 1 on
> arrays, and it would be inconsistent to allow that for arrays with
> elements, but not for arrays without.  I could imagine somebody
> wanting to create an empty zero-based array, and then iteratively
> append elements to it.

Hmmm.  You know, I think that's why we originally had array_upper() on
an empty array return NULL, not 0.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [COMMITTERS] pgsql: Allow external recovery_config_directory
Next
From: Dean Rasheed
Date:
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)