Re: Inconsistent behavior on Array & Is Null? - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Inconsistent behavior on Array & Is Null?
Date
Msg-id 200404011712.23382.josh@agliodbs.com
Whole thread Raw
In response to Re: Inconsistent behavior on Array & Is Null?  (Joe Conway <mail@joeconway.com>)
Responses Re: Inconsistent behavior on Array & Is Null?  (Joe Conway <mail@joeconway.com>)
Re: Inconsistent behavior on Array & Is Null?  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Joe,

> This is correct. There are no dimensions to an empty array by 
> definition. The only other way to handle this would be an ERROR. I 
> followed the lead of (the pre-existing function) array_dims() when 
> creating array_upper() and array_lower().

What about a 0?    That seems more consistent to me.   If the array is empty, 
its dimensions are not "NULL", meaning "unknown", but in fact zero elements, 
which is a known value.  The way it works now, array_upper on a NULL array 
produces the same results as array_upper on an empty-but-non-null array.

Or is there some concept I'm missing?

-- 
-Josh BerkusAglio Database SolutionsSan Francisco



pgsql-hackers by date:

Previous
From: "J. Andrew Rogers"
Date:
Subject: PITR for replication?
Next
From: Gavin Sherry
Date:
Subject: Re: PITR for replication?