Re: Disallow arrays with non-standard lower bounds - Mailing list pgsql-hackers

From David Fetter
Subject Re: Disallow arrays with non-standard lower bounds
Date
Msg-id 20140109234129.GA7956@fetter.org
Whole thread Raw
In response to Disallow arrays with non-standard lower bounds  (Jim Nasby <jim@nasby.net>)
Responses Re: Disallow arrays with non-standard lower bounds  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Re: Disallow arrays with non-standard lower bounds  (Peter Geoghegan <pg@heroku.com>)
Re: Disallow arrays with non-standard lower bounds  (Craig Ringer <craig@2ndquadrant.com>)
List 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@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.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



pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: array_length(anyarray)
Next
From: Gavin Flower
Date:
Subject: Re: Disallow arrays with non-standard lower bounds