Re: [GENERAL] Empty arrays with ARRAY[]
От | Tom Lane |
---|---|
Тема | Re: [GENERAL] Empty arrays with ARRAY[] |
Дата | |
Msg-id | 23298.1196183991@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [GENERAL] Empty arrays with ARRAY[] ("Brendan Jurd" <direvus@gmail.com>) |
Ответы |
Re: [GENERAL] Empty arrays with ARRAY[]
|
Список | pgsql-hackers |
"Brendan Jurd" <direvus@gmail.com> writes: > Now I'm thinking I leave the grammar rules alone (apart from making it > legal to specify an empty list of elements), and instead push the > typename down into the child node from makeTypeCast(), if the child is > an A_ArrayExpr. Does that work better? Actually, if you do that you might as well forego the separate node type (which requires a nontrivial amount of infrastructure). I think it would work just about as well to have transformExpr check whether the argument of a TypeCast is an ArrayExpr, and if so call transformArrayExpr directly from there, passing the TypeName as an additional argument. Kinda ugly, but not really any worse than the way A_Const is handled in that same routine. (In fact, we could use the same technique to get rid of the typename field in A_Const ... might be worth doing?) regards, tom lane
В списке pgsql-hackers по дате отправления: