Re: [GENERAL] Empty arrays with ARRAY[] - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] Empty arrays with ARRAY[]
Date
Msg-id 12813.1196203773@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] Empty arrays with ARRAY[]  ("Brendan Jurd" <direvus@gmail.com>)
Responses Re: [GENERAL] Empty arrays with ARRAY[]  ("Brendan Jurd" <direvus@gmail.com>)
Re: [GENERAL] Empty arrays with ARRAY[]  ("Brendan Jurd" <direvus@gmail.com>)
List pgsql-hackers
"Brendan Jurd" <direvus@gmail.com> writes:
> I actually thought that A_ArrayExpr would be a good addition even if
> you ignore the matter of typecasting.  It always seemed weird to me
> that the parser generates an ArrayExpr directly.  ArrayExpr has a
> bunch of members that are only set by the transform; all the parser
> does is set the 'elements' member.

Well, that's a reasonable argument.  And now that I think about it,
a parser-only node type doesn't have nearly the support overhead that
a full-fledged executable node does.  So no objection to A_ArrayExpr
if you want to do that.

> I had a bit of a dig into this.  A_Const->typename gets set directly
> by the parse paths for "INTERVAL [(int)] string [interval range]".  In
> fact, as far as I can tell that's the _only_ place A_Const->typename
> gets used at all.

Uh, you missed quite a lot of others ... see CURRENT_DATE and a lot of
other productions.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Quality and Performance
Next
From: Tom Lane
Date:
Subject: Re: Quality and Performance