From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Brendan Jurd <direvus(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(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-13 16:57:27 |
Message-ID: | CAHyXU0xY_Y9iSxksaL86-Ktoo83ZV6A5VqG4QBaa1NboZz2SbQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 12, 2013 at 10:00 PM, Brendan Jurd <direvus(at)gmail(dot)com> wrote:
> On 13 June 2013 04:26, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
>> On Wed, Jun 12, 2013 at 1:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Josh Berkus <josh(at)agliodbs(dot)com> writes:
>>>> On 06/12/2013 11:01 AM, Tom Lane wrote:
>>>>> I'm going to be disappointed if all we can get out of this is
>>>>> a cardinality() function, and nothing is done about the empty-array
>>>>> semantics.
>
> I would be disappointed too, but on the other hand, CARDINALITY is
> required by the spec and anything would be better than nothing.
certainly.
>> But, couldn't that be solved by deprecating that function and
>> providing a more sensible alternatively named version?
>
> And what would you name that function? array_dims2? I can't think of
> a name that makes the difference in behaviour apparent. Can you
> imagine the documentation for that?
I don't know the answer to that, but I think it's hard to argue that
deprecating and documenting a few functions is a heavier burden on
your users than having to sift through older arcane code before
upgrading to the latest version of the database. We're not the only
ones stuck with lousy old functions (C finally ditched gets() in the
2011 standard). I also happen to think the current array_api function
names are not particularly great (especially array_upper/array_lower)
so I won't shed too many tears.
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2013-06-13 17:36:40 | Re: [PATCH] Remove useless USE_PGXS support in contrib |
Previous Message | Tom Lane | 2013-06-13 15:06:31 | Re: Passing fdw_private data from PlanForeignScan to PlanForeignModify |