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

From David E. Wheeler
Subject Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Date
Msg-id B928A8E6-82CF-4CAD-BC2D-6CD06326E92B@justatheory.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>)
Responses Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
On Jun 11, 2013, at 3:09 PM, Brendan Jurd <direvus@gmail.com> wrote:

> There have been attempts to add a cardinality function in the past, as
> it is required by the SQL spec, but these attempts have stalled when
> trying to decide how it should handle multidim arrays.  Having it
> return the length of the first dimension is the more spec-compatible
> way to go, but some folks argued that it should work as
> ArrayGetNItems, because we don't already have a function for that at
> the SQL level.  Therefore I propose we add cardinality() per the spec,
> and another function to expose ArrayGetNItems.
>
> And that's about where we got to, when the whole discussion was put on
> a time-out to make room for the beta.
>
> I am withdrawing the original zero-D patch in favour of the proposed
> new functions.  If you have an opinion about that, please do chime in.
> Depending on how that goes I may post a patch implementing my new
> proposal in the next few days.

+1 to this proposal. Modulo function names, perhaps. I don’t much care what they're called, as long as the work as you
describehere. 

Best,

David
Array Complainer




pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Adding IEEE 754:2008 decimal floating point and hardware support for it
Next
From: Mark Kirkwood
Date:
Subject: Re: Clean switchover