Re: Should array_length() Return NULL - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Should array_length() Return NULL
Date
Msg-id E65FC6AF-0A6E-40E3-B4C9-56E9599A6577@justatheory.com
Whole thread Raw
In response to Re: Should array_length() Return NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Should array_length() Return NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mar 15, 2013, at 3:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> The thing is that that syntax creates an array of zero dimensions,
> not one that has 1 dimension and zero elements.  So "0" would be
> incorrect.
> 
> Our handling of empty arrays leaves something to be desired, I agree,
> but making it more consistent seems like a large task.  Hacking
> array_length in isolation will certainly not help.

Oh. Is there a way to declare an empty 1-dimension array?

Thanks,

David




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Should array_length() Return NULL
Next
From: Tom Lane
Date:
Subject: Re: Materialized view assertion failure in HEAD