pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Uriy Zhuravlev <u.zhuravlev@postgrespro.ru>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Some questions about the array.
Date: Tue, 22 Dec 2015 10:10:31 -0500
Message-ID: <12549.1450797031@sss.pgh.pa.us> (raw)
In-Reply-To: <bfc00a3c-529f-4d1a-895f-388885144d62@postgrespro.ru>
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>
	<bfc00a3c-529f-4d1a-895f-388885144d62@postgrespro.ru>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Uriy Zhuravlev <u.zhuravlev@postgrespro.ru> 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



view thread (56+ messages)  latest in thread

Message-ID: <12549.1450797031@sss.pgh.pa.us>
Permalink:  ../12549.1450797031@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12549.1450797031@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, u.zhuravlev@postgrespro.ru
  Subject: Re: Some questions about the array.
  In-Reply-To: <12549.1450797031@sss.pgh.pa.us>
  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> <bfc00a3c-529f-4d1a-895f-388885144d62@postgrespro.ru> <12549.1450797031@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox