Re: Some questions about the array.

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: 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-07 02:44:45
Message-ID: 563D659D.2020708@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/5/15 10:55 PM, Craig Ringer wrote:
> 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.

+1

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

I'm all for ditching variable start, full stop.

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

I'd prefer that over using something like ~.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2015-11-07 03:15:54 Re: Bitmap index scans use of filters on available columns
Previous Message Jim Nasby 2015-11-07 02:40:56 Re: Request: pg_cancel_backend variant that handles 'idle in transaction' sessions