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

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Date: 2013-03-28 01:06:07
Message-ID: 5153977F.1050104@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2013-03-28 01:16:18 Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Previous Message Michael Paquier 2013-03-28 01:00:43 Re: [COMMITTERS] pgsql: Allow external recovery_config_directory