You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Move a few very simple node-creation and node-type-testing functionsfrom the planner's clauses.c to nodes/makefuncs and nodes/nodeFuncs.There's nothing planner-specific about them, as evidenced by thenumber of other places that were using them.While at it, rename and_clause() etc to is_andclause() etc, to clarifythat they are node-type-testing functions not node-creation functions.And use "static inline" implementations for the shortest ones.Also, modify flatten_join_alias_vars() and some subsidiary functionsto take a Query not a PlannerInfo to define the join structure thatVars should be translated according to. They were only using the"parse" field of the PlannerInfo anyway, so this just requires removingone level of indirection. The advantage is that now parse_agg.c canuse flatten_join_alias_vars() without the horrid kluge of creating anincomplete PlannerInfo, which will allow that file to be decoupled fromrelation.h in a subsequent patch.Discussion:https://postgr.es/m/11460.1548706639@sss.pgh.pa.us