Some questions about the array.

From: YUriy Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Some questions about the array.
Date: 2015-10-09 12:02:21
Message-ID: 2987745.PueTkqGxbO@dinodell
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-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
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

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.

YUriy Zhuravlev
Postgres Professional:
The Russian Postgres Company


Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2015-10-09 12:10:11 Re: Multi-tenancy with RLS
Previous Message Michael Paquier 2015-10-09 11:53:56 Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.