Re: Some questions about the array. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Some questions about the array.
Date
Msg-id 12549.1450797031@sss.pgh.pa.us
Whole thread Raw
In response to Re: Some questions about the array.  (Uriy Zhuravlev <u.zhuravlev@postgrespro.ru>)
Responses Re: Some questions about the array.  (Yury Zhuravlev <u.zhuravlev@postgrespro.ru>)
Re: Some questions about the array.  (Yury Zhuravlev <u.zhuravlev@postgrespro.ru>)
List pgsql-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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: parallel joins, and better parallel explain
Next
From: Magnus Hagander
Date:
Subject: Re: Maintenance on git.postgresql.org