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(Expr *expr);
> extern bool plan_cluster_use_sort(Oid tableOid, Oid indexOid);

> Seems it could be used by a large percentage of files currently
> including planner.h.

Hmm.  I'd be a bit inclined to define such a file as "planner's
externally visible API", which would mean it should also include
planner() itself, and maybe also eval_const_expressions --- are
there external uses of that?

If we wanted to get rid of external uses of clauses.h, we'd probably
want to move some things like contain_mutable_functions() to nodeFuncs.c,
rather than put them into this hypothetical new header.

                        regards, tom lane

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to