Re: Possible marginally-incompatible change to array subscripting - Mailing list pgsql-hackers

From Joshua D. Drake
Subject Re: Possible marginally-incompatible change to array subscripting
Date
Msg-id 567999D5.1070106@commandprompt.com
Whole thread Raw
In response to Re: Possible marginally-incompatible change to array subscripting  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 12/22/2015 10:01 AM, Robert Haas wrote:
> On Tue, Dec 22, 2015 at 12:55 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> On Tue, Dec 22, 2015 at 11:51 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> ISTM that if we'd had Yury's code in there from the beginning, what we
>>>> would define this as meaning is "a[3:4][:5]", ie the implied range runs
>>>> from whatever the array lower bound is up to the specified subscript.
>>
>>> Gosh, our arrays are strange.  I would have expected a[3:4][5] to mean
>>> a[3:4][5:5].
>>
>> Yeah, probably, now that you mention it ... but that seems like too much
>> of a compatibility break.  Or does anyone want to argue for just doing
>> that and never mind the compatibility issues?  This is a pretty weird
>> corner case already; there can't be very many people relying on it.
>
> To be honest, I'd be inclined not to change the semantics at all.  But
> that's just me.
>

I think a sane approach is better than a safe approach.

JD

-- 
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: A Typo in regress/sql/privileges.sql
Next
From: Pavel Stehule
Date:
Subject: Re: Possible marginally-incompatible change to array subscripting