From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, YUriy Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Some questions about the array. |
Date: | 2015-11-06 05:33:37 |
Message-ID: | CAKFQuwbkLfHBkdEE22uiiEopc=C-CVHQjMbGPwP7c67PsPLvOw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thursday, November 5, 2015, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
> On 6 November 2015 at 12:45, Robert Haas <robertmhaas(at)gmail(dot)com
> <javascript:;>> wrote:
> > On Thu, Nov 5, 2015 at 9:57 AM, YUriy Zhuravlev
> > <u(dot)zhuravlev(at)postgrespro(dot)ru <javascript:;>> wrote:
> >> Hello hackers.
> >> There are comments to my patch? Maybe I should create a separate thread?
> >> Thanks.
> >
> > You should add this on commitfest.postgresql.org.
> >
> > I think the first question that needs to be answered is "do we want
> > this?". I'm sure I know your answer, but what do other people think?
>
> Omitted bounds are common in other languages and would be handy. I
> don't think they'd cause any issues with multi-dimensional arrays or
> variable start-pos arrays.
>
> I'd love negative indexes, but the variable-array-start (mis)feature
> means we can't have those. I wouldn't shed a tear if
> variable-start-position arrays were deprecated and removed, but that's
> a multi-year process, and I'm not convinced negative indexes justify
> it even though the moveable array start pos feature seems little-used.
>
> Since the start-pos is recorded in the array, I wonder if it's worth
> supporting negative indexing for arrays with the default 1-indexed
> element numbering, and just ERRORing for others. Does anyone really
> use anything else?
>
>
Does it have to be "negative"?
Would something like array[1:~1] as a syntax be acceptable to denote
backward counting?
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-11-06 05:34:27 | Re: Patch: Implement failover on libpq connect level. |
Previous Message | Robert Haas | 2015-11-06 05:32:27 | Re: NOTIFY in Background Worker |