Re: [GENERAL] Empty arrays with ARRAY[]
От | Brendan Jurd |
---|---|
Тема | Re: [GENERAL] Empty arrays with ARRAY[] |
Дата | |
Msg-id | 37ed240d0711261242p29404abbw1bcd68efe5b6d29b@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [GENERAL] Empty arrays with ARRAY[] ("Brendan Jurd" <direvus@gmail.com>) |
Ответы |
Re: [GENERAL] Empty arrays with ARRAY[]
|
Список | pgsql-hackers |
Quoting Tom, from the previous thread linked by Martijn: > It could be pretty ugly, because type assignment normally proceeds > bottom-up :-(. What you might have to do is make the raw grammar > representation of ARRAY[] work like A_Const does, ie, there's a > slot to plug in a typecast. That's pretty much vestigial now for > A_Const, if memory serves, but it'd be needful if ARRAY[] has to > be able to "see" the typecast that would otherwise be above it in > the parse tree. This approach is making sense to me, but I've run into a bit of a dependency issue. A_Const does indeed have a slot for typecasts by way of a TypeName member. A_Const and TypeName are both defined in parsenodes.h, whereas ArrayExpr is defined in primnodes.h. So unfortunately I can't just add a TypeName member to ArrayExpr. I'm new to this area of the codebase (and parsers generally), so I'm treading carefully. What would be the best way to resolve this? Would moving TypeName into primnodes.h be acceptable? Thanks for your time, BJ
В списке pgsql-hackers по дате отправления: