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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brendan Jurd <direvus(at)gmail(dot)com>
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 06:09:49
Message-ID: 16846.1365401389@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brendan Jurd <direvus(at)gmail(dot)com> writes:
> On 7 April 2013 01:43, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
>> Your interpretation matches mine all around. It is unfortunate
>> that we have hijacked the standard's syntax for arrays to add a
>> matrix feature.

> It really is unfortunate. I wonder if it was done in an attempt to
> mimic Oracle behaviour.

Hardly likely. That code goes back to Berkeley days (PostQUEL) ---
there is clear ancestry from the array code in Postgres v4r2 released
June 1994. It's more or less a coincidence that it matches the SQL spec
at all, and I'd be astonished if it matched Oracle particularly closely.

> 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 :-(

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2013-04-08 08:11:30 Re: pgsql: Get rid of USE_WIDE_UPPER_LOWER dependency in trigram constructi
Previous Message Tom Lane 2013-04-08 05:28:39 Re: WIP: index support for regexp search