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: 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-05 02:04:43
Message-ID: 19440.1365127483@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:
> The other suggestion that had been tossed around elsewhere upthread
> was inventing a new type that serves the demand for a straightforward
> mutable list, which has exactly one dimension, and which may be
> sensibly empty. Those few who are interested in dimensions >= 2 could
> keep on using "arrays", with all their backwards-compatible silliness
> intact, and everybody else could migrate to "lists" at their leisure.

> I don't hate the latter idea from a user perspective, but from a
> developer perspective I suspect there are valid objections to be made.

The real problem with that is that the existing arrays have glommed onto
the syntax that is both most natural and SQL-spec-required. I don't
think there is a lot of room to shove in a different kind of critter
there. (There's been a remarkable lack of attention to the question
of spec compliance in this thread, btw. Surely the standard has
something to say on the matter of zero-length arrays?)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2013-04-05 03:32:17 Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Previous Message Jeff Davis 2013-04-05 01:59:40 Re: corrupt pages detected by enabling checksums