]> granicus.if.org Git - postgresql/commitdiff
Rename nodes/relation.h to nodes/pathnodes.h.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 29 Jan 2019 21:49:25 +0000 (16:49 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 29 Jan 2019 21:49:25 +0000 (16:49 -0500)
The old name of this file was never a very good indication of what it
was for.  Now that there's also access/relation.h, we have a potential
confusion hazard as well, so let's rename it to something more apropos.
Per discussion, "pathnodes.h" is reasonable, since a good fraction of
the file is Path node definitions.

While at it, tweak a couple of other headers that were gratuitously
importing relation.h into modules that don't need it.

Discussion: https://postgr.es/m/7719.1548688728@sss.pgh.pa.us

44 files changed:
contrib/bloom/bloom.h
contrib/postgres_fdw/postgres_fdw.h
src/backend/executor/execAmi.c
src/backend/executor/nodeCustom.c
src/backend/nodes/README
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/nodeFuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/print.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/util/predtest.c
src/backend/rewrite/rewriteManip.c
src/backend/statistics/dependencies.c
src/backend/statistics/extended_stats.c
src/include/access/tsmapi.h
src/include/executor/executor.h
src/include/executor/nodeCustom.h
src/include/foreign/fdwapi.h
src/include/nodes/extensible.h
src/include/nodes/nodes.h
src/include/nodes/pathnodes.h [moved from src/include/nodes/relation.h with 99% similarity]
src/include/optimizer/appendinfo.h
src/include/optimizer/clauses.h
src/include/optimizer/cost.h
src/include/optimizer/geqo.h
src/include/optimizer/inherit.h
src/include/optimizer/joininfo.h
src/include/optimizer/optimizer.h
src/include/optimizer/orclauses.h
src/include/optimizer/paramassign.h
src/include/optimizer/pathnode.h
src/include/optimizer/paths.h
src/include/optimizer/placeholder.h
src/include/optimizer/plancat.h
src/include/optimizer/planmain.h
src/include/optimizer/planner.h
src/include/optimizer/prep.h
src/include/optimizer/restrictinfo.h
src/include/optimizer/subselect.h
src/include/optimizer/tlist.h
src/include/partitioning/partprune.h
src/include/statistics/statistics.h
src/include/utils/selfuncs.h

index 24200fb5faca5006f52e3292da1a399ebc747932..d641361aef1f1003c2c37485665a8aae6d2b22d0 100644 (file)
@@ -17,7 +17,7 @@
 #include "access/generic_xlog.h"
 #include "access/itup.h"
 #include "access/xlog.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 #include "fmgr.h"
 
 /* Support procedures numbers */
index ce24c2a4d2c12746e50e5a355ef5201958032c85..3f501032853d4ac3fca27da87ba5d6cd6e2fef7e 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "foreign/foreign.h"
 #include "lib/stringinfo.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 #include "utils/relcache.h"
 
 #include "libpq-fe.h"
index cd77f9927e5734c949e3d66427ca09eade5b5277..187f892421f8421477efe1ff54849d7aa839a25b 100644 (file)
@@ -56,8 +56,9 @@
 #include "executor/nodeValuesscan.h"
 #include "executor/nodeWindowAgg.h"
 #include "executor/nodeWorktablescan.h"
+#include "nodes/extensible.h"
 #include "nodes/nodeFuncs.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 #include "utils/rel.h"
 #include "utils/syscache.h"
 
index eb65a6385f24b5be8f4a9272c6c2da1860f127c6..6dd0916818fcbbdc7b12db6f41ee4062fb5ed3e0 100644 (file)
@@ -14,6 +14,7 @@
 #include "executor/executor.h"
 #include "executor/nodeCustom.h"
 #include "nodes/execnodes.h"
+#include "nodes/extensible.h"
 #include "nodes/plannodes.h"
 #include "miscadmin.h"
 #include "parser/parsetree.h"
index 2df4389437e437cafa41a71546624a814819c5bc..dcd66d7243c06767221befda292b263491c8856a 100644 (file)
@@ -36,8 +36,8 @@ FILES IN src/include/nodes/
        nodes.h         - define node tags (NodeTag)
        primnodes.h     - primitive nodes
        parsenodes.h    - parse tree nodes
+       pathnodes.h     - path tree nodes and planner internal structures
        plannodes.h     - plan tree nodes
-       relation.h      - planner internal nodes
        execnodes.h     - executor nodes
        memnodes.h      - memory nodes
        pg_list.h       - generic list
index 3eb7e95d6412a573d151db5143302c14d43de00e..807393dfaa4493dba6d67d6ffe8ae17195c56dd2 100644 (file)
@@ -24,8 +24,8 @@
 
 #include "miscadmin.h"
 #include "nodes/extensible.h"
+#include "nodes/pathnodes.h"
 #include "nodes/plannodes.h"
-#include "nodes/relation.h"
 #include "utils/datum.h"
 #include "utils/rel.h"
 
@@ -2196,7 +2196,7 @@ _copyOnConflictExpr(const OnConflictExpr *from)
 }
 
 /* ****************************************************************
- *                                             relation.h copy functions
+ *                                             pathnodes.h copy functions
  *
  * We don't support copying RelOptInfo, IndexOptInfo, or Path nodes.
  * There are some subsidiary structs that are useful to copy, though.
index 5c4fa7d077a6de764c3dc28f081f8a51307132f7..a397de155eb3de0601a77981cf1bfbad5393e2fb 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "miscadmin.h"
 #include "nodes/extensible.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 #include "utils/datum.h"
 
 
@@ -814,7 +814,7 @@ _equalOnConflictExpr(const OnConflictExpr *a, const OnConflictExpr *b)
 }
 
 /*
- * Stuff from relation.h
+ * Stuff from pathnodes.h
  */
 
 static bool
index ecb9abd7fe9f5eda718d0c073ecec7ee30e5d4ef..1275c7168fe87371ed85d507767d50e4aac311a5 100644 (file)
@@ -20,7 +20,7 @@
 #include "nodes/makefuncs.h"
 #include "nodes/execnodes.h"
 #include "nodes/nodeFuncs.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
 
index 33f7939e0586f96cc12556fe67fcbf90a1ead51a..9d44e3e4c633e880d33e6f23cacb850451168207 100644 (file)
@@ -32,8 +32,8 @@
 #include "lib/stringinfo.h"
 #include "miscadmin.h"
 #include "nodes/extensible.h"
+#include "nodes/pathnodes.h"
 #include "nodes/plannodes.h"
-#include "nodes/relation.h"
 #include "utils/datum.h"
 #include "utils/rel.h"
 
@@ -1676,7 +1676,7 @@ _outOnConflictExpr(StringInfo str, const OnConflictExpr *node)
 
 /*****************************************************************************
  *
- *     Stuff from relation.h.
+ *     Stuff from pathnodes.h.
  *
  *****************************************************************************/
 
index 6d6da5299faf0b38e2ab44a72941eadc28c87f71..4b9e141404c011a27b91cc40804d0efcfc1d90e1 100644 (file)
@@ -22,8 +22,8 @@
 #include "access/printtup.h"
 #include "lib/stringinfo.h"
 #include "nodes/nodeFuncs.h"
+#include "nodes/pathnodes.h"
 #include "nodes/print.h"
-#include "nodes/relation.h"
 #include "parser/parsetree.h"
 #include "utils/lsyscache.h"
 
index 532de4484fad2085b8684ca6dde156b5001226ba..b8d406f230c3aa2ad7eabcee8f1df52e4c1eec6d 100644 (file)
@@ -540,7 +540,7 @@ cost_index(IndexPath *path, PlannerInfo *root, double loop_count,
         * for scanning the index, as well as the selectivity of the index (ie,
         * the fraction of main-table tuples we will have to retrieve) and its
         * correlation to the main-table tuple order.  We need a cast here because
-        * relation.h uses a weak function type to avoid including amapi.h.
+        * pathnodes.h uses a weak function type to avoid including amapi.h.
         */
        amcostestimate = (amcostestimate_function) index->amcostestimate;
        amcostestimate(root, path, loop_count,
@@ -4072,7 +4072,7 @@ get_restriction_qual_cost(PlannerInfo *root, RelOptInfo *baserel,
  *     sjinfo: SpecialJoinInfo relevant to this join
  *     restrictlist: join quals
  * Output parameters:
- *     *semifactors is filled in (see relation.h for field definitions)
+ *     *semifactors is filled in (see pathnodes.h for field definitions)
  */
 void
 compute_semi_anti_join_factors(PlannerInfo *root,
index 3b260b1e3c418ccc5f0dd9c7ba8d0959795bf691..01f64eeab564a7870194ab57101d49795da4865d 100644 (file)
@@ -21,7 +21,7 @@
 #include "miscadmin.h"
 #include "nodes/makefuncs.h"
 #include "nodes/nodeFuncs.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 #include "optimizer/optimizer.h"
 #include "utils/array.h"
 #include "utils/inval.h"
index 57aee3d760ca5a71bb22fc07ffcaf811a573e28c..8fa5c11cc71650b99b47a3130445196eb9335ac1 100644 (file)
@@ -16,8 +16,8 @@
 #include "catalog/pg_type.h"
 #include "nodes/makefuncs.h"
 #include "nodes/nodeFuncs.h"
+#include "nodes/pathnodes.h"
 #include "nodes/plannodes.h"
-#include "nodes/relation.h"
 #include "parser/parse_coerce.h"
 #include "parser/parse_relation.h"
 #include "parser/parsetree.h"
index 13492ceb9cedb73e28fce55770a940bec4e671b1..96916eafe1fc41ba168a84c56e716f132317023d 100644 (file)
@@ -22,7 +22,7 @@
 #include "optimizer/clauses.h"
 #include "optimizer/optimizer.h"
 #include "nodes/nodes.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 #include "statistics/extended_stats_internal.h"
 #include "statistics/statistics.h"
 #include "utils/bytea.h"
index 7f13e434a8722f4bde297b75bd3a46e9e31efe78..d429a531de80f0e4476a7a1e1ea80650bec5dfc4 100644 (file)
@@ -22,7 +22,6 @@
 #include "catalog/indexing.h"
 #include "catalog/pg_collation.h"
 #include "catalog/pg_statistic_ext.h"
-#include "nodes/relation.h"
 #include "postmaster/autovacuum.h"
 #include "statistics/extended_stats_internal.h"
 #include "statistics/statistics.h"
index f39c55d8d6623b67cca98a9bca3bc7d7bc6129e6..a5c0b4cafecfac336864536b6dc0749d512f08bd 100644 (file)
@@ -13,7 +13,7 @@
 #define TSMAPI_H
 
 #include "nodes/execnodes.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 
 /*
index 3831cceedfaba20a084eb734576d6920ac0dfc73..537fe5cef0946872d6e6055c8d0341f5c76d4c6e 100644 (file)
@@ -87,7 +87,7 @@ extern PGDLLIMPORT ExecutorCheckPerms_hook_type ExecutorCheckPerms_hook;
 /*
  * prototypes from functions in execAmi.c
  */
-struct Path;                                   /* avoid including relation.h here */
+struct Path;                                   /* avoid including pathnodes.h here */
 
 extern void ExecReScan(PlanState *node);
 extern void ExecMarkPos(PlanState *node);
index 0ef5870006eff241e8951dc43d6c48cf60cb8248..3c1dd19a4a36ee31ca5cd458807318ecc31f2249 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "access/parallel.h"
 #include "nodes/execnodes.h"
-#include "nodes/extensible.h"
 
 /*
  * General executor code
index e19d53a41f0142dc950fa2e2a59fc62558229957..01c95c3267501d03593d6156cddba4d1586b30dc 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "access/parallel.h"
 #include "nodes/execnodes.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 /* To avoid including explain.h here, reference ExplainState thus: */
 struct ExplainState;
index 7f9b6d8052bc87d03e53dacfb85f1b4e940d4e90..58878edba251d17f61202f9c115f383231b4412e 100644 (file)
@@ -17,8 +17,8 @@
 #include "access/parallel.h"
 #include "commands/explain.h"
 #include "nodes/execnodes.h"
+#include "nodes/pathnodes.h"
 #include "nodes/plannodes.h"
-#include "nodes/relation.h"
 
 /* maximum length of an extensible node identifier */
 #define EXTNODENAME_MAX_LEN                                    64
index 4808a9e76d47d2f6603e9d7c213d485d70d4a81e..fbe2dc14a7da4af910cce8ac28ab393746c0b126 100644 (file)
@@ -215,7 +215,7 @@ typedef enum NodeTag
        T_DomainConstraintState,
 
        /*
-        * TAGS FOR PLANNER NODES (relation.h)
+        * TAGS FOR PLANNER NODES (pathnodes.h)
         */
        T_PlannerInfo,
        T_PlannerGlobal,
@@ -741,7 +741,7 @@ typedef enum JoinType
  * AggStrategy -
  *       overall execution strategies for Agg plan nodes
  *
- * This is needed in both plannodes.h and relation.h, so put it here...
+ * This is needed in both pathnodes.h and plannodes.h, so put it here...
  */
 typedef enum AggStrategy
 {
@@ -755,7 +755,7 @@ typedef enum AggStrategy
  * AggSplit -
  *       splitting (partial aggregation) modes for Agg plan nodes
  *
- * This is needed in both plannodes.h and relation.h, so put it here...
+ * This is needed in both pathnodes.h and plannodes.h, so put it here...
  */
 
 /* Primitive options supported by nodeAgg.c: */
@@ -785,7 +785,7 @@ typedef enum AggSplit
  * SetOpCmd and SetOpStrategy -
  *       overall semantics and execution strategies for SetOp plan nodes
  *
- * This is needed in both plannodes.h and relation.h, so put it here...
+ * This is needed in both pathnodes.h and plannodes.h, so put it here...
  */
 typedef enum SetOpCmd
 {
similarity index 99%
rename from src/include/nodes/relation.h
rename to src/include/nodes/pathnodes.h
index 7917b889aebf6593b668fbef1b9206fa70097fe8..d3c477a542afdc50d5965bf369e25fc4e7324466 100644 (file)
@@ -1,18 +1,18 @@
 /*-------------------------------------------------------------------------
  *
- * relation.h
- *       Definitions for planner's internal data structures.
+ * pathnodes.h
+ *       Definitions for planner's internal data structures, especially Paths.
  *
  *
  * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * src/include/nodes/relation.h
+ * src/include/nodes/pathnodes.h
  *
  *-------------------------------------------------------------------------
  */
-#ifndef RELATION_H
-#define RELATION_H
+#ifndef PATHNODES_H
+#define PATHNODES_H
 
 #include "access/sdir.h"
 #include "fmgr.h"
@@ -2433,4 +2433,4 @@ typedef struct JoinCostWorkspace
        double          inner_rows_total;
 } JoinCostWorkspace;
 
-#endif                                                 /* RELATION_H */
+#endif                                                 /* PATHNODES_H */
index 604e36d73cbe00bc437301f22ef737ca84ee64d8..790914c1b07a8adabc6acc84ef901d70422480ea 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef APPENDINFO_H
 #define APPENDINFO_H
 
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 #include "utils/relcache.h"
 
 extern AppendRelInfo *make_append_rel_info(Relation parentrel,
index cfedd424ced6ce1ddbd881b8c4657938704143e8..23073c0402d5c4e3d3a9bd0c08a20ebe7ba29a84 100644 (file)
@@ -15,7 +15,7 @@
 #define CLAUSES_H
 
 #include "access/htup.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 typedef struct
 {
index 48efbe58f7fc2265789c45deec49b22a55328b4f..ac6de0f6bec37ff2ebdb2295e6df3b322b864d51 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef COST_H
 #define COST_H
 
+#include "nodes/pathnodes.h"
 #include "nodes/plannodes.h"
-#include "nodes/relation.h"
 
 
 /* defaults for costsize.c's Cost parameters */
index dc88fbbc1bad9a573362e4052339fb55222c8116..5b3327665e951080af2285178cbbeca6c6b7bd5c 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef GEQO_H
 #define GEQO_H
 
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 #include "optimizer/geqo_gene.h"
 
 
index b2687abd4e08a9732846fecabcbc66bc29ec6f15..d2418f15cfaf11c63d20a4bc7e59ad817855ac88 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef INHERIT_H
 #define INHERIT_H
 
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 
 extern void expand_inherited_tables(PlannerInfo *root);
index 65981743314a725d1abcbdc9bf8cbd8ec19b0e50..c6e4be6cf4ecb206929ad7f02293f10c242b64ac 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef JOININFO_H
 #define JOININFO_H
 
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 
 extern bool have_relevant_joinclause(PlannerInfo *root,
index 1cd5c80e76851d25e03a9c6c113082a9e60d6a24..ffaf5b9450b05ae9bf9d8e6e7fc0ba6cef3307fa 100644 (file)
 #include "nodes/parsenodes.h"
 
 /*
- * We don't want to include nodes/relation.h here, because non-planner
+ * We don't want to include nodes/pathnodes.h here, because non-planner
  * code should generally treat PlannerInfo as an opaque typedef.
  * But we'd like such code to use that typedef name, so define the
- * typedef either here or in relation.h, whichever is read first.
+ * typedef either here or in pathnodes.h, whichever is read first.
  */
 #ifndef HAVE_PLANNERINFO_TYPEDEF
 typedef struct PlannerInfo PlannerInfo;
index 8ccb98e5678e5b9d88c2bf55303948af240b5c8b..b527900189642fd9b56a11d7eb3152d400d73c72 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef ORCLAUSES_H
 #define ORCLAUSES_H
 
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 extern void extract_restriction_or_clauses(PlannerInfo *root);
 
index d18c85c938be08ca4063eb056e2c0060e137e336..e18f420eb4047befa8acb3cba4219e9a30a06323 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef PARAMASSIGN_H
 #define PARAMASSIGN_H
 
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 extern Param *replace_outer_var(PlannerInfo *root, Var *var);
 extern Param *replace_outer_placeholdervar(PlannerInfo *root,
index aaaf3f4ff50a8b9d3c6034982175954a38599c00..d0c8f99d0a548092d5525b3093f7a6ccda1dcfd4 100644 (file)
@@ -15,7 +15,7 @@
 #define PATHNODE_H
 
 #include "nodes/bitmapset.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 
 /*
index 666217c1895afd07afdf5b481425819104b88995..1b02b3b889f2830a908fd0031b94da367f10e90b 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef PATHS_H
 #define PATHS_H
 
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 
 /*
index c7764a722639310462693ad62e9af034f6364fd7..86a1e5d039d4b17f3abd43bf6d4c5e7e0118735e 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef PLACEHOLDER_H
 #define PLACEHOLDER_H
 
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 
 extern PlaceHolderVar *make_placeholder_expr(PlannerInfo *root, Expr *expr,
index a1b23251a11f98f348a65183dd01581d630e4f68..40f70f9f2b1faafeb0a5ff34646750d550f358fe 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef PLANCAT_H
 #define PLANCAT_H
 
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 #include "utils/relcache.h"
 
 /* Hook for plugins to get control in get_relation_info() */
index b2e1c077320368fc55aca4b6d48ee6c2095a87e1..3bbdb5e2f7456c5a03ca7b20e9dcb56cc2e978c4 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef PLANMAIN_H
 #define PLANMAIN_H
 
+#include "nodes/pathnodes.h"
 #include "nodes/plannodes.h"
-#include "nodes/relation.h"
 
 /* GUC parameters */
 #define DEFAULT_CURSOR_TUPLE_FRACTION 0.1
index 769a2f8e011ce5e246246a53bea39fccafc34121..cb41e409dc354931c639be74dc195162c7f411fe 100644 (file)
@@ -18,8 +18,8 @@
 #ifndef PLANNER_H
 #define PLANNER_H
 
+#include "nodes/pathnodes.h"
 #include "nodes/plannodes.h"
-#include "nodes/relation.h"
 
 
 /* Hook for plugins to get control in planner() */
index 5277e990ed9c60f290d8a6f6072181d761f50d88..a9b2c9026cbedf303936480ad4c502531e9f17fd 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef PREP_H
 #define PREP_H
 
+#include "nodes/pathnodes.h"
 #include "nodes/plannodes.h"
-#include "nodes/relation.h"
 
 
 /*
index bca480f446f4bdee24ee49bf73284c15aafd1076..feeaf0e674ee6223171ff03141efadb6697a65c1 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef RESTRICTINFO_H
 #define RESTRICTINFO_H
 
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 
 /* Convenience macro for the common case of a valid-everywhere qual */
index 22959ff42382c8dfb3c56f3faf4bc06d34d210a0..2d2c3bcbc0606a5633b8201abb34b48e371f5342 100644 (file)
@@ -13,8 +13,8 @@
 #ifndef SUBSELECT_H
 #define SUBSELECT_H
 
+#include "nodes/pathnodes.h"
 #include "nodes/plannodes.h"
-#include "nodes/relation.h"
 
 extern void SS_process_ctes(PlannerInfo *root);
 extern JoinExpr *convert_ANY_sublink_to_join(PlannerInfo *root,
index 13ac7b88b46223b4a5f3ae1a88356ccb5e42b55e..58db79203bc6e41c5499c10814f6fd9d37435871 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef TLIST_H
 #define TLIST_H
 
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 
 extern TargetEntry *tlist_member(Expr *node, List *targetlist);
index ce9bc8d9fd8516eb7ad53517ad03ee8ba8a3fbb9..397ffaab369fd322f9c4fe61e329f14b0901f5fa 100644 (file)
@@ -15,7 +15,8 @@
 #define PARTPRUNE_H
 
 #include "nodes/execnodes.h"
-#include "nodes/relation.h"
+struct PlannerInfo;                            /* avoid including pathnodes.h here */
+struct RelOptInfo;
 
 
 /*
@@ -71,12 +72,12 @@ typedef struct PartitionPruneContext
 #define PruneCxtStateIdx(partnatts, step_id, keyno) \
        ((partnatts) * (step_id) + (keyno))
 
-extern PartitionPruneInfo *make_partition_pruneinfo(PlannerInfo *root,
-                                                RelOptInfo *parentrel,
+extern PartitionPruneInfo *make_partition_pruneinfo(struct PlannerInfo *root,
+                                                struct RelOptInfo *parentrel,
                                                 List *subpaths,
                                                 List *partitioned_rels,
                                                 List *prunequal);
-extern Relids prune_append_rel_partitions(RelOptInfo *rel);
+extern Bitmapset *prune_append_rel_partitions(struct RelOptInfo *rel);
 extern Bitmapset *get_matching_partitions(PartitionPruneContext *context,
                                                List *pruning_steps);
 
index 02d1efb54d3d8a63ea13a83225d4c83585bef91f..4876e9523f643ea37a34ef346be21bd6bb59dea2 100644 (file)
@@ -14,7 +14,7 @@
 #define STATISTICS_H
 
 #include "commands/vacuum.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 #define STATS_MAX_DIMENSIONS   8       /* max number of attributes */
 
index 5cc4cf15e2800747abe58c751ce009b7fc66520e..6b1ef91af6addcffb03c46588b80bdb02164f875 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "fmgr.h"
 #include "access/htup.h"
-#include "nodes/relation.h"
+#include "nodes/pathnodes.h"
 
 
 /*