Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Merlin Moncure
On Sun, Jan 12, 2014 at 4:38 AM, Craig Ringer cr...@2ndquadrant.com wrote: Implicit casts to text, anybody? This backward compatibility break orphaned the company I work for on 8.1 until last year and very nearly caused postgres to be summarily extirpated (only rescued at the last minute by my

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Jim Nasby
On 1/13/14, 10:40 AM, Merlin Moncure wrote: On Sun, Jan 12, 2014 at 4:38 AM, Craig Ringercr...@2ndquadrant.com wrote: Implicit casts to text, anybody? This backward compatibility break orphaned the company I work for on 8.1 until last year and very nearly caused postgres to be summarily

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread David Fetter
On Mon, Jan 13, 2014 at 10:40:57AM -0600, Merlin Moncure wrote: On Sun, Jan 12, 2014 at 4:38 AM, Craig Ringer cr...@2ndquadrant.com wrote: Implicit casts to text, anybody? This backward compatibility break orphaned the company I work for on 8.1 until last year and very nearly caused

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Robert Haas
On Mon, Jan 13, 2014 at 4:45 PM, David Fetter da...@fetter.org wrote: On Mon, Jan 13, 2014 at 10:40:57AM -0600, Merlin Moncure wrote: On Sun, Jan 12, 2014 at 4:38 AM, Craig Ringer cr...@2ndquadrant.com wrote: Implicit casts to text, anybody? This backward compatibility break orphaned the

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Merlin Moncure
On Mon, Jan 13, 2014 at 3:45 PM, David Fetter da...@fetter.org wrote: On Mon, Jan 13, 2014 at 10:40:57AM -0600, Merlin Moncure wrote: This project has no deprecation policy, I believe it actually does, although it's not a formal, written policy. Would you like to help draft one up? Lack of

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Craig Ringer
On 01/14/2014 12:40 AM, Merlin Moncure wrote: On Sun, Jan 12, 2014 at 4:38 AM, Craig Ringer cr...@2ndquadrant.com wrote: Implicit casts to text, anybody? This backward compatibility break orphaned the company I work for on 8.1 until last year and very nearly caused postgres to be summarily

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Hannu Krosing
On 01/14/2014 12:33 AM, Craig Ringer wrote: On 01/14/2014 12:40 AM, Merlin Moncure wrote: On Sun, Jan 12, 2014 at 4:38 AM, Craig Ringer cr...@2ndquadrant.com wrote: Implicit casts to text, anybody? This backward compatibility break orphaned the company I work for on 8.1 until last year and

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Jim Nasby
On 1/13/14, 5:33 PM, Craig Ringer wrote: So I guess the question is: Is it worth all that hassle to remove a misfeature you have to go out of your way to use? Is support for non-1 lower bounds stopping us from doing something useful and important? Or is it just an irritation that it exists?

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Tom Lane
Craig Ringer cr...@2ndquadrant.com writes: So I guess the question is: Is it worth all that hassle to remove a misfeature you have to go out of your way to use? Is support for non-1 lower bounds stopping us from doing something useful and important? Or is it just an irritation that it exists?

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: I think the argument really is that some people don't want to make their application code work with such cases (which is fine) so they'd like an inside-the-database guarantee that the app code won't ever see such cases.  Which is less fine, ISTM: if you fear

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Jim Nasby
On 1/13/14, 7:10 PM, Kevin Grittner wrote: Tom Lanet...@sss.pgh.pa.us wrote: I think the argument really is that some people don't want to make their application code work with such cases (which is fine) so they'd like an inside-the-database guarantee that the app code won't ever see such

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Florian Pflug
On Jan14, 2014, at 00:33 , Craig Ringer cr...@2ndquadrant.com wrote: So I guess the question is: Is it worth all that hassle to remove a misfeature you have to go out of your way to use? Is support for non-1 lower bounds stopping us from doing something useful and important? Or is it just an

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-13 Thread Florian Pflug
On Jan14, 2014, at 02:10 , Kevin Grittner kgri...@ymail.com wrote: The fact that some day some new programmer might not be aware of all business rules, or might choose to try to ignore them is the reason you add constraints to columns and domains. Well, for columns and domains that seems

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-12 Thread Craig Ringer
On 01/10/2014 07:41 AM, David Fetter wrote: 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

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-10 Thread Jim Nasby
On 1/9/14, 10:58 PM, Tom Lane wrote: Jim Nasby j...@nasby.net writes: 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

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-10 Thread Andrew Dunstan
On 01/10/2014 04:26 PM, Jim Nasby wrote: On 1/9/14, 10:58 PM, Tom Lane wrote: Jim Nasby j...@nasby.net writes: 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

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-10 Thread David Fetter
On Fri, Jan 10, 2014 at 03:26:04PM -0600, Jim Nasby wrote: On 1/9/14, 10:58 PM, Tom Lane wrote: Jim Nasby j...@nasby.net writes: 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

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-10 Thread Kevin Grittner
Gavin Flower gavinflo...@archidevsys.co.nz wrote: Starting arrays at zero makes the most sense, as then you can calculate the displacement simply as (index) * (size of entry), and not have subtract one from the index first.  This would be my preference. The SQL standard explicitly specifies

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-10 Thread Jeff Janes
On Fri, Jan 10, 2014 at 1:26 PM, Jim Nasby j...@nasby.net wrote: On 1/9/14, 10:58 PM, Tom Lane wrote: Jim Nasby j...@nasby.net writes: 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

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-10 Thread Merlin Moncure
On Fri, Jan 10, 2014 at 4:10 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Fri, Jan 10, 2014 at 1:26 PM, Jim Nasby j...@nasby.net wrote: On 1/9/14, 10:58 PM, Tom Lane wrote: Jim Nasby j...@nasby.net writes: ISTM that allowing users to pick arbitrary lower array bounds was a huge mistake.

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-10 Thread Jim Nasby
On 1/10/14, 4:14 PM, Merlin Moncure wrote: On Fri, Jan 10, 2014 at 4:10 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Fri, Jan 10, 2014 at 1:26 PM, Jim Nasby j...@nasby.net wrote: On 1/9/14, 10:58 PM, Tom Lane wrote: Jim Nasby j...@nasby.net writes: ISTM that allowing users to pick

[HACKERS] Disallow arrays with non-standard lower bounds

2014-01-09 Thread Jim Nasby
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

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-09 Thread Peter Geoghegan
On Thu, Jan 9, 2014 at 2:30 PM, Jim Nasby j...@nasby.net 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

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-09 Thread David Fetter
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

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-09 Thread Gavin Flower
On 10/01/14 12:41, David Fetter wrote: [..] David (who is among that tiny minority who believe that arrays should be indexed from 0.5 as a compromise ;) Clearly we should use 1/e as the starting index, where 'e' is Euler's constant 2.718... :-) (Much more mathematically profound!) Cheers,

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-09 Thread Peter Geoghegan
On Thu, Jan 9, 2014 at 3:41 PM, David Fetter da...@fetter.org wrote: 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. While the decision to make it possible to

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-09 Thread Gavin Flower
On 10/01/14 12:55, Peter Geoghegan wrote: On Thu, Jan 9, 2014 at 3:41 PM, David Fetter da...@fetter.org wrote: 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.

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-09 Thread Tom Lane
Jim Nasby j...@nasby.net writes: 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. You lack