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

From: Brendan Jurd <direvus(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Florian Pflug <fgp(at)phlo(dot)org>, Josh Berkus <josh(at)agliodbs(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Date: 2013-04-08 13:59:16
Message-ID: CADxJZo3bSfweXaOaYREUGqy9w_easG_2q10kFL9F+mm+=jqhQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8 April 2013 16:09, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Brendan Jurd <direvus(at)gmail(dot)com> writes:
>> On the specific issue of CARDINALITY, I guess we need to decide
>> whether we are going to pretend that our array/matrix thing is
>> actually nested. I first argued that we should not. But it occurred
>> to me that if we do pretend, it would at least leave the door ajar if
>> we want to do something to make our arrays more nest-like in future,
>> without disrupting the behaviour of CARDINALITY.
>
> This seems to be exactly the same uncertainty that we couldn't resolve
> back in the 8.4 devel cycle, for exactly the same reasons. I don't see
> that the discussion has moved forward any :-(
>

I had a poke around in the archives, and it seems to me that the major
argument that was advanced in favour of making cardinality() return
the total number of items was ... we don't have anything that does
that yet. That's why I'm proposing we add array_num_items as well --
I do think there should be a function for this, I just don't think
cardinality fits the bill.

Cheers,
BJ

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-04-08 14:25:08 Re: Unrecognized type error (postgres 9.1.4)
Previous Message Rodrigo Barboza 2013-04-08 13:57:39 Re: Unrecognized type error (postgres 9.1.4)