On Nov 27, 2007 8:04 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Brendan Jurd" <direvus@gmail.com> writes:
> > ... So
> > unfortunately I can't just add a TypeName member to ArrayExpr.
>
> That would be quite the wrong thing to do anyway, since ArrayExpr is
> a run-time representation and shouldn't have any such thing attached
> to it. What you probably need is a separate parse-time representation
> of ARRAY[], a la the difference between A_Const and Const.
>
Ah. I wasn't aware of the distinction; I started by looking in gram.y
and saw that the ARRAY parse path creates an ArrayExpr node, whilst
the constant parse paths create A_Const nodes. I didn't realise that
ArrayExpr was "skipping ahead" and creating the same kind of object
that the transform produces.
Glad I stopped and asked for directions then. =)
I'm not 100% clear on what the A_ prefix signifies ... is A_ArrayExpr
a good name for the parse-time structure?
Thanks for your time,
BJ