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

From Tom Lane
Subject Re: Possible marginally-incompatible change to array subscripting
Date
Msg-id 4310.1450836560@sss.pgh.pa.us
Whole thread Raw
In response to Re: Possible marginally-incompatible change to array subscripting  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2015-12-22 18:34 GMT+01:00 Robert Haas <robertmhaas@gmail.com>:
>> 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].

> exactly,

Since it's not clear that we've got consensus on doing anything
differently, I've adjusted the current patch to preserve the existing
behavior here (and added some regression tests showing that behavior).
If we do decide to change it, it'd be more appropriate to make that
change in a separate commit, anyway.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Freeze avoidance of very large table.
Next
From: Tom Lane
Date:
Subject: Re: Some questions about the array.