Re: [HACKERS] COPY planning

2015-09-28 Thread Tom Lane
Alvaro Herrera writes: > Yup. However I notice that there are a few other callers of > expression_planner() that do not involve the optimizer for anything > else. Maybe it makes sense to have a separate header file that's just > #include "nodes/primnodes.h" > extern Expr *expression_planner(Exp

Re: [HACKERS] COPY planning

2015-09-28 Thread Alvaro Herrera
Stephen Frost wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Alvaro Herrera writes: > > > I noticed that COPY calls planner() (this was introduced in 85188ab88). > > > I think it should be calling pg_plan_query() instead. > > > > +1 --- AFAICS, this is the *only* place that is going directly

Re: [HACKERS] COPY planning

2015-09-22 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Alvaro Herrera writes: > > I noticed that COPY calls planner() (this was introduced in 85188ab88). > > I think it should be calling pg_plan_query() instead. > > +1 --- AFAICS, this is the *only* place that is going directly to > planner() without going thr

Re: [HACKERS] COPY planning

2015-09-21 Thread Tom Lane
Alvaro Herrera writes: > I noticed that COPY calls planner() (this was introduced in 85188ab88). > I think it should be calling pg_plan_query() instead. +1 --- AFAICS, this is the *only* place that is going directly to planner() without going through pg_plan_query(); other utility functions such

[HACKERS] COPY planning

2015-09-21 Thread Alvaro Herrera
I noticed that COPY calls planner() (this was introduced in 85188ab88). I think it should be calling pg_plan_query() instead. The latter is a very thin wrapper around the former which simply adds a couple of logging entries, DTrace hooks for start/end, and a debugging cross-check for plan node cop