On Fri, Oct 9, 2015 at 8:02 AM, YUriy Zhuravlev
<u.zhurav...@postgrespro.ru> wrote:
> 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.

That seems like a complete non-starter because it would break backward
compatibility.  Our array implementation allows negative indexes:

rhaas=# select ('[-1:4]={3,1,4,1,5,9}'::int[])[-1];
 int4
------
    3
(1 row)

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL 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 via email to