Re: Disallow arrays with non-standard lower bounds

From: David Fetter <david(at)fetter(dot)org>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Disallow arrays with non-standard lower bounds
Date: 2014-01-09 23:41:29
Message-ID: 20140109234129.GA7956@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 09, 2014 at 04:30:25PM -0600, Jim Nasby wrote:
> ISTM that allowing users to pick arbitrary lower array bounds was a
> huge mistake. I've never seen anyone make use of it, can't think of
> any legitimate use cases for it, and hate the stupendous amount of
> extra code needed to deal with it.
>
> Obviously we can't just drop support, but what about an initdb (or
> hell, even configure) option to disallow arrays with a lower bound
> <> 1? Unfortunately we can't do this with a GUC since you can store
> arrays in a table.

We have dropped support, as you put it, for bigger and harder-hitting
mistakes than this. Anybody whose code has this kind of silliness in
it will be in other kinds of trouble, too.

Cheers,
David (who is among that tiny minority who believe that arrays should
be indexed from 0.5 as a compromise ;)
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Flower 2014-01-09 23:51:09 Re: Disallow arrays with non-standard lower bounds
Previous Message Florian Pflug 2014-01-09 23:25:32 Re: array_length(anyarray)