Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkWQ9-0001wr-OZ for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Oct 2015 12:05:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZkWQ8-0001HF-Ug for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Oct 2015 12:05:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZkWOq-0008DW-2I for pgsql-hackers@postgresql.org; Fri, 09 Oct 2015 12:03:48 +0000 Received: from newmail.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZkWOi-0007Zh-TY for pgsql-hackers@postgresql.org; Fri, 09 Oct 2015 12:03:47 +0000 Received: from dinodell.localnet (unknown [192.168.27.1]) by mail.postgrespro.ru (Postfix) with ESMTPSA id B319B21C393F for ; Fri, 9 Oct 2015 15:03:38 +0300 (MSK) From: YUriy Zhuravlev 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> Organization: postgrespro User-Agent: KMail/4.14.10 (Linux/4.2.2-gentoo; KDE/4.14.12; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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