Re: refactoring planner data structures
От | Tom Lane |
---|---|
Тема | Re: refactoring planner data structures |
Дата | |
Msg-id | 5959.1118025137@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | refactoring planner data structures (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Neil Conway <neilc@samurai.com> writes: > I was rather disappointed, as I wasn't able to find a clean > way to get around the problem described in the thread above -- e.g. > in_info_list and query tree mutators: > http://archives.postgresql.org/pgsql-hackers/2005-03/msg00718.php > How were you thinking of solving it? Yeah, that gave me some headaches :-(. It turns out that most of the uses of walkers/mutators are on not-yet-planned Querys and so the failure to visit the in_info_list doesn't matter. I had to add code in just two places to visit the in_info_list explicitly. Plan B would be to add PlannerInfo as a node type that the walker/mutator code knows how to traverse. I didn't do this for the moment because it's not immediately obvious why the traverse should only visit the Query and the in_info_list subfields; that seems sufficiently ad-hoc to be better kept at the call sites for the moment. Maybe we can revisit that later. Ideally I'd like to get rid of in_info_list altogether ... it's a bit of a kluge. Don't see how to do that yet though. regards, tom lane
В списке pgsql-hackers по дате отправления: