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

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Florian Pflug <fgp(at)phlo(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Brendan Jurd <direvus(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Date: 2013-04-03 18:53:05
Message-ID: 515C7A91.8030700@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/04/13 05:30, Tom Lane wrote:
>>> Zero as the default lower bound is consistent with most languages
>>> (especially the common ones like C, C++, Java, & Python), in fact
>>> I don't remember any language where that is not the case (ignoring
>>> SQL) - and I've written programs in about 20 languages.
> Fortran ... Basic ... actually I'd have thought that zero was a
> minority position. Fashions change I guess.
>
> regards, tom lane
I had forgotten the indexing in BASIC & FORTRAN, I now recall COBOL's
TABLE's were equivalent to arrays and they started at one.

Cheers,
Gavin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-04-03 18:54:01 Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Previous Message Andres Freund 2013-04-03 18:51:07 Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)