Re: Possible marginally-incompatible change to array subscripting

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Yury Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>
Subject: Re: Possible marginally-incompatible change to array subscripting
Date: 2015-12-22 18:01:53
Message-ID: CA+TgmoYVt9OmDy5fTcfUUwFmP4r3qTcXOr2KMZG5Gu0pMprnHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 22, 2015 at 12:55 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Dec 22, 2015 at 11:51 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-12-22 18:04:18 Re: A Typo in regress/sql/privileges.sql
Previous Message Tom Lane 2015-12-22 18:01:43 Re: Possible marginally-incompatible change to array subscripting