Re: Some questions about the array.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Uriy Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Some questions about the array.
Date: 2015-12-22 15:10:31
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Uriy Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)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

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2015-12-22 15:13:34 Re: Maintenance on
Previous Message Robert Haas 2015-12-22 15:00:37 Re: parallel joins, and better parallel explain