Robert Haas <robertmh...@gmail.com> writes:
> On Tue, Dec 22, 2015 at 11:51 AM, Tom Lane <t...@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.

Another point worth realizing is that the implicit insertion of "1:"
happens in the parser, meaning that existing stored views/rules will dump
out with that added and hence aren't going to change meaning no matter
what we decide here.

(BTW, now that I've read the patch a bit further, it actually silently
changed the semantics as I'm suggesting already.  We could undo that
without too much extra code, but I feel that we shouldn't.  Robert's
idea seems like a plausible alternative, but it would take a nontrivial
amount of code to implement it unless we are willing to double-evaluate
such a subscript.)

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to