Re: Some questions about the array.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Some questions about the array.
Дата
Msg-id CA+TgmoadZKV2r0ecANk_9rvbq8q7Gi2kUog0GA5HM3hA2-M_Qg@mail.gmail.com
обсуждение исходный текст
Ответ на Some questions about the array.  (YUriy Zhuravlev <u.zhuravlev@postgrespro.ru>)
Список pgsql-hackers
On Fri, Oct 9, 2015 at 8:02 AM, YUriy Zhuravlev
<u.zhuravlev@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_ctl/pg_rewind tests vs. slow AIX buildfarm members
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files