From: YUriy Zhuravlev <u.zhuravlev@postgrespro.ru>
To: pgsql-hackers@postgresql.org
Subject: Some questions about the array.
Date: Fri, 09 Oct 2015 15:02:21 +0300
Message-ID: <2987745.PueTkqGxbO@dinodell> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
We were some of the issues associated with the behavior of arrays.
1. We would like to implement arrays negative indices (from the end) like in
Python or Ruby: arr[-2] or arr[1: -1]
but as an array can be indexed in the negative area so it probably can not be
done.
2. We would like to add the ability be omitted boundaries in the slice.
Example: arr[2:] or arr[:2]. But there was a problem with the update of an
empty array:
arr[1:][1:] = {1,2,3,4,5,6} can be interpreted as
arr[1:3][1:2] or arr[1:2] [1:3] or [1:1], [1:6]
What is the history of the emergence of such arrays? Maybe something can be
improved?
P.S. I would like List datatype as in Python. Is there any fundamental
objections? Or we just did not have the time and enthusiasm before?
The current implementation I would call vectors or matrices but not arrays.
IMHO
--
YUriy Zhuravlev
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: u.zhuravlev@postgrespro.ru
Subject: Re: Some questions about the array.
In-Reply-To: <2987745.PueTkqGxbO@dinodell>
References: <2987745.PueTkqGxbO@dinodell>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox