Re: [GENERAL] Empty arrays with ARRAY[]
От | Brendan Jurd |
---|---|
Тема | Re: [GENERAL] Empty arrays with ARRAY[] |
Дата | |
Msg-id | 37ed240d0711261431j3c36c13bn519b0a4d70a41343@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [GENERAL] Empty arrays with ARRAY[] (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [GENERAL] Empty arrays with ARRAY[]
|
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: