Re: Possible marginally-incompatible change to array subscripting

From: Yury Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possible marginally-incompatible change to array subscripting
Date: 2015-12-22 17:50:07
Message-ID: 1e6d817a-f976-4d26-84ba-055c4a96f053@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> This would make no difference of course for the common case where the
> array lower bound is 1, but it seems a lot less arbitrary when it isn't.
> So I think we should strongly consider changing it to mean that, even
> though it would be non-backwards-compatible in such cases.
>
> Comments?

If you break backwards compatibility, it can be done arrays
similar to C/C++/Python/Ruby and other languages style?
I'm sorry to bring up this thread again...

> 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.

[3:4][:5] instead a[3:4][5] at least this is logical. But after what will
result from a[3:4][5]? One element?

Thanks.

--
Yury Zhuravlev
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-12-22 17:51:12 Re: Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?
Previous Message Robert Haas 2015-12-22 17:47:39 Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan