Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a3k6R-0007tX-8v for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Dec 2015 12:32:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a3k6Q-000723-S0 for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Dec 2015 12:32:14 +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 1a3k56-0005GP-S9 for pgsql-hackers@postgresql.org; Tue, 01 Dec 2015 12:30:52 +0000 Received: from hook.sigaev.ru ([93.180.27.50]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a3k54-0005Z6-1u for pgsql-hackers@postgresql.org; Tue, 01 Dec 2015 12:30:52 +0000 Received: from xor.sai.msu.ru (newmail.postgrespro.ru [93.174.131.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: teodor) by hook.sigaev.ru (Postfix) with ESMTPSA id 399A9B1918A; Tue, 1 Dec 2015 15:30:48 +0300 (MSK) Message-ID: <565D92F7.5000505@sigaev.ru> Date: Tue, 01 Dec 2015 15:30:47 +0300 From: Teodor Sigaev User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1 MIME-Version: 1.0 To: YUriy Zhuravlev , pgsql-hackers@postgresql.org Subject: Re: Some questions about the array. References: <2987745.PueTkqGxbO@dinodell> <1885247.qWD6L4eZuE@dinodell> <56586767.6040205@sigaev.ru> <2110708.mPfsb934rA@dinodell> In-Reply-To: <2110708.mPfsb934rA@dinodell> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit 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 > On Friday 27 November 2015 17:23:35 Teodor Sigaev wrote: >> 1 >> Documentation isn't very informative > Added example with different results. Perfect >> 2 >> Seems, error messages are too inconsistent. If you forbid omitting bound in >> assigment then if all cases error message should be the same or close. > Done. Skipping lower boundary is no longer an error. > > Thank you for your review. Much better, but: # create table xxx (a int[]); # update xxx set a[2:] = '{1,2}'; UPDATE 0 # insert into xxx values ('{1,2,3,3,4,4,5}'); INSERT 0 1 # update xxx set a[2:] = '{1,2}'; ERROR: cannot determine upper index for empty array As I understand, update should fail with any array, so, first update should fail too. Am I right? -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers