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

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Florian Pflug <fgp(at)phlo(dot)org>, 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-06-12 03:50:53
Message-ID: B928A8E6-82CF-4CAD-BC2D-6CD06326E92B@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jun 11, 2013, at 3:09 PM, Brendan Jurd <direvus(at)gmail(dot)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 describe here.

Best,

David
Array Complainer

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Kirkwood 2013-06-12 03:55:21 Re: Clean switchover
Previous Message Craig Ringer 2013-06-12 03:44:31 Re: Adding IEEE 754:2008 decimal floating point and hardware support for it