aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-01-29 15:48:51 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2019-01-29 15:48:51 -0500
commitf09346a9c6218dd239fdf3a79a729716c0d305bd (patch)
treed33b3c1a0770578079e94991384923280991a252 /src/backend/executor
parenta1b8c41e990ec0f083e9b684700a07640d5a356a (diff)
downloadpostgresql-f09346a9c6218dd239fdf3a79a729716c0d305bd.tar.gz
postgresql-f09346a9c6218dd239fdf3a79a729716c0d305bd.zip
Refactor planner's header files.
Create a new header optimizer/optimizer.h, which exposes just the planner functions that can be used "at arm's length", without need to access Paths or the other planner-internal data structures defined in nodes/relation.h. This is intended to provide the whole planner API seen by most of the rest of the system; although FDWs still need to use additional stuff, and more thought is also needed about just what selfuncs.c should rely on. The main point of doing this now is to limit the amount of new #include baggage that will be needed by "planner support functions", which I expect to introduce later, and which will be in relevant datatype modules rather than anywhere near the planner. This commit just moves relevant declarations into optimizer.h from other header files (a couple of which go away because everything got moved), and adjusts #include lists to match. There's further cleanup that could be done if we want to decide that some stuff being exposed by optimizer.h doesn't belong in the planner at all, but I'll leave that for another day. Discussion: https://postgr.es/m/11460.1548706639@sss.pgh.pa.us
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/execExpr.c3
-rw-r--r--src/backend/executor/execMain.c1
-rw-r--r--src/backend/executor/execParallel.c2
-rw-r--r--src/backend/executor/nodeAgg.c3
-rw-r--r--src/backend/executor/nodeGather.c2
-rw-r--r--src/backend/executor/nodeGatherMerge.c2
-rw-r--r--src/backend/executor/nodeIndexscan.c1
-rw-r--r--src/backend/executor/nodeWindowAgg.c2
8 files changed, 5 insertions, 11 deletions
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index 2e061a5ee36..e52b8063728 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -40,8 +40,7 @@
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
-#include "optimizer/clauses.h"
-#include "optimizer/planner.h"
+#include "optimizer/optimizer.h"
#include "pgstat.h"
#include "utils/builtins.h"
#include "utils/datum.h"
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 5975c5206b8..9a20460e762 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -52,7 +52,6 @@
#include "jit/jit.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
-#include "optimizer/clauses.h"
#include "parser/parsetree.h"
#include "rewrite/rewriteManip.h"
#include "storage/bufmgr.h"
diff --git a/src/backend/executor/execParallel.c b/src/backend/executor/execParallel.c
index ceea3d6d721..b79be91655b 100644
--- a/src/backend/executor/execParallel.c
+++ b/src/backend/executor/execParallel.c
@@ -39,8 +39,6 @@
#include "executor/tqueue.h"
#include "jit/jit.h"
#include "nodes/nodeFuncs.h"
-#include "optimizer/planmain.h"
-#include "optimizer/planner.h"
#include "storage/spin.h"
#include "tcop/tcopprot.h"
#include "utils/datum.h"
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 2a260a71f24..263a0f81279 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -226,8 +226,7 @@
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
-#include "optimizer/clauses.h"
-#include "optimizer/tlist.h"
+#include "optimizer/optimizer.h"
#include "parser/parse_agg.h"
#include "parser/parse_coerce.h"
#include "utils/acl.h"
diff --git a/src/backend/executor/nodeGather.c b/src/backend/executor/nodeGather.c
index 70a4e90a05d..69d5a1f2398 100644
--- a/src/backend/executor/nodeGather.c
+++ b/src/backend/executor/nodeGather.c
@@ -38,7 +38,7 @@
#include "executor/nodeSubplan.h"
#include "executor/tqueue.h"
#include "miscadmin.h"
-#include "optimizer/planmain.h"
+#include "optimizer/optimizer.h"
#include "pgstat.h"
#include "utils/memutils.h"
#include "utils/rel.h"
diff --git a/src/backend/executor/nodeGatherMerge.c b/src/backend/executor/nodeGatherMerge.c
index 8635865d1e6..4de1d2b484d 100644
--- a/src/backend/executor/nodeGatherMerge.c
+++ b/src/backend/executor/nodeGatherMerge.c
@@ -23,7 +23,7 @@
#include "executor/tqueue.h"
#include "lib/binaryheap.h"
#include "miscadmin.h"
-#include "optimizer/planmain.h"
+#include "optimizer/optimizer.h"
#include "utils/memutils.h"
#include "utils/rel.h"
diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c
index cdf1ad09de3..324356ec757 100644
--- a/src/backend/executor/nodeIndexscan.c
+++ b/src/backend/executor/nodeIndexscan.c
@@ -37,7 +37,6 @@
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "nodes/nodeFuncs.h"
-#include "optimizer/clauses.h"
#include "utils/array.h"
#include "utils/datum.h"
#include "utils/lsyscache.h"
diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c
index 731391f1907..157ac042b82 100644
--- a/src/backend/executor/nodeWindowAgg.c
+++ b/src/backend/executor/nodeWindowAgg.c
@@ -41,7 +41,7 @@
#include "executor/nodeWindowAgg.h"
#include "miscadmin.h"
#include "nodes/nodeFuncs.h"
-#include "optimizer/clauses.h"
+#include "optimizer/optimizer.h"
#include "parser/parse_agg.h"
#include "parser/parse_coerce.h"
#include "utils/acl.h"