Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aBObZ-0002i4-IJ for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Dec 2015 15:12:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aBObZ-0002OL-3e for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Dec 2015 15:12:01 +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 1aBOaF-0000tx-Ap for pgsql-hackers@postgresql.org; Tue, 22 Dec 2015 15:10:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aBOaC-0006y6-E9 for pgsql-hackers@postgresql.org; Tue, 22 Dec 2015 15:10:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id tBMFAVoZ012550; Tue, 22 Dec 2015 10:10:31 -0500 From: Tom Lane To: Uriy Zhuravlev cc: pgsql-hackers@postgresql.org Subject: Re: Some questions about the array. In-reply-to: References: <2987745.PueTkqGxbO@dinodell> <1538864.xaPm21N10Q@dinodell> <56619AB0.2070802@sigaev.ru> <2723429.ZaCixaFn1x@dinodell> <6ac195fe-b835-4d2d-8edc-11db52118cbf@postgrespro.ru> <2853.1450718923@sss.pgh.pa.us> Comments: In-reply-to Uriy Zhuravlev message dated "Tue, 22 Dec 2015 14:29:00 +0300" Date: Tue, 22 Dec 2015 10:10:31 -0500 Message-ID: <12549.1450797031@sss.pgh.pa.us> 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 Uriy Zhuravlev writes: > On понедельник, 21 декабря 2015 г. 20:28:43 MSK, Tom Lane wrote: >> With is_slice false, the only valid >> case is lidx==NULL, uidx!=NULL, as before for non-slice notation. > But now it becomes valid syntax: > select ('{1,2,3,4}'::int[])[NULL:NULL]; > I do not think it's logical. Especially if in [:] function is used. > Unexpected behavior. I think you are confused about the difference between a NULL constant (which would give rise to an A_Const syntax tree node) and a NULL syntax tree pointer (which cannot arise from any actual syntactical construct, and would only be present if the grammar put it there due to lack of any corresponding item in the input). regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers