Commit fa2cf164 authored by Tom Lane's avatar Tom Lane

Rename nodes/relation.h to nodes/pathnodes.h.

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
parent f09346a9
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "access/generic_xlog.h" #include "access/generic_xlog.h"
#include "access/itup.h" #include "access/itup.h"
#include "access/xlog.h" #include "access/xlog.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
#include "fmgr.h" #include "fmgr.h"
/* Support procedures numbers */ /* Support procedures numbers */
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "foreign/foreign.h" #include "foreign/foreign.h"
#include "lib/stringinfo.h" #include "lib/stringinfo.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
#include "utils/relcache.h" #include "utils/relcache.h"
#include "libpq-fe.h" #include "libpq-fe.h"
......
...@@ -56,8 +56,9 @@ ...@@ -56,8 +56,9 @@
#include "executor/nodeValuesscan.h" #include "executor/nodeValuesscan.h"
#include "executor/nodeWindowAgg.h" #include "executor/nodeWindowAgg.h"
#include "executor/nodeWorktablescan.h" #include "executor/nodeWorktablescan.h"
#include "nodes/extensible.h"
#include "nodes/nodeFuncs.h" #include "nodes/nodeFuncs.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/syscache.h" #include "utils/syscache.h"
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "executor/executor.h" #include "executor/executor.h"
#include "executor/nodeCustom.h" #include "executor/nodeCustom.h"
#include "nodes/execnodes.h" #include "nodes/execnodes.h"
#include "nodes/extensible.h"
#include "nodes/plannodes.h" #include "nodes/plannodes.h"
#include "miscadmin.h" #include "miscadmin.h"
#include "parser/parsetree.h" #include "parser/parsetree.h"
......
...@@ -36,8 +36,8 @@ FILES IN src/include/nodes/ ...@@ -36,8 +36,8 @@ FILES IN src/include/nodes/
nodes.h - define node tags (NodeTag) nodes.h - define node tags (NodeTag)
primnodes.h - primitive nodes primnodes.h - primitive nodes
parsenodes.h - parse tree nodes parsenodes.h - parse tree nodes
pathnodes.h - path tree nodes and planner internal structures
plannodes.h - plan tree nodes plannodes.h - plan tree nodes
relation.h - planner internal nodes
execnodes.h - executor nodes execnodes.h - executor nodes
memnodes.h - memory nodes memnodes.h - memory nodes
pg_list.h - generic list pg_list.h - generic list
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#include "miscadmin.h" #include "miscadmin.h"
#include "nodes/extensible.h" #include "nodes/extensible.h"
#include "nodes/pathnodes.h"
#include "nodes/plannodes.h" #include "nodes/plannodes.h"
#include "nodes/relation.h"
#include "utils/datum.h" #include "utils/datum.h"
#include "utils/rel.h" #include "utils/rel.h"
...@@ -2196,7 +2196,7 @@ _copyOnConflictExpr(const OnConflictExpr *from) ...@@ -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. * We don't support copying RelOptInfo, IndexOptInfo, or Path nodes.
* There are some subsidiary structs that are useful to copy, though. * There are some subsidiary structs that are useful to copy, though.
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "miscadmin.h" #include "miscadmin.h"
#include "nodes/extensible.h" #include "nodes/extensible.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
#include "utils/datum.h" #include "utils/datum.h"
...@@ -814,7 +814,7 @@ _equalOnConflictExpr(const OnConflictExpr *a, const OnConflictExpr *b) ...@@ -814,7 +814,7 @@ _equalOnConflictExpr(const OnConflictExpr *a, const OnConflictExpr *b)
} }
/* /*
* Stuff from relation.h * Stuff from pathnodes.h
*/ */
static bool static bool
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "nodes/makefuncs.h" #include "nodes/makefuncs.h"
#include "nodes/execnodes.h" #include "nodes/execnodes.h"
#include "nodes/nodeFuncs.h" #include "nodes/nodeFuncs.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
#include "lib/stringinfo.h" #include "lib/stringinfo.h"
#include "miscadmin.h" #include "miscadmin.h"
#include "nodes/extensible.h" #include "nodes/extensible.h"
#include "nodes/pathnodes.h"
#include "nodes/plannodes.h" #include "nodes/plannodes.h"
#include "nodes/relation.h"
#include "utils/datum.h" #include "utils/datum.h"
#include "utils/rel.h" #include "utils/rel.h"
...@@ -1676,7 +1676,7 @@ _outOnConflictExpr(StringInfo str, const OnConflictExpr *node) ...@@ -1676,7 +1676,7 @@ _outOnConflictExpr(StringInfo str, const OnConflictExpr *node)
/***************************************************************************** /*****************************************************************************
* *
* Stuff from relation.h. * Stuff from pathnodes.h.
* *
*****************************************************************************/ *****************************************************************************/
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
#include "access/printtup.h" #include "access/printtup.h"
#include "lib/stringinfo.h" #include "lib/stringinfo.h"
#include "nodes/nodeFuncs.h" #include "nodes/nodeFuncs.h"
#include "nodes/pathnodes.h"
#include "nodes/print.h" #include "nodes/print.h"
#include "nodes/relation.h"
#include "parser/parsetree.h" #include "parser/parsetree.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
......
...@@ -540,7 +540,7 @@ cost_index(IndexPath *path, PlannerInfo *root, double loop_count, ...@@ -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, * 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 * 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 * 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 = (amcostestimate_function) index->amcostestimate;
amcostestimate(root, path, loop_count, amcostestimate(root, path, loop_count,
...@@ -4072,7 +4072,7 @@ get_restriction_qual_cost(PlannerInfo *root, RelOptInfo *baserel, ...@@ -4072,7 +4072,7 @@ get_restriction_qual_cost(PlannerInfo *root, RelOptInfo *baserel,
* sjinfo: SpecialJoinInfo relevant to this join * sjinfo: SpecialJoinInfo relevant to this join
* restrictlist: join quals * restrictlist: join quals
* Output parameters: * Output parameters:
* *semifactors is filled in (see relation.h for field definitions) * *semifactors is filled in (see pathnodes.h for field definitions)
*/ */
void void
compute_semi_anti_join_factors(PlannerInfo *root, compute_semi_anti_join_factors(PlannerInfo *root,
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "miscadmin.h" #include "miscadmin.h"
#include "nodes/makefuncs.h" #include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h" #include "nodes/nodeFuncs.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
#include "optimizer/optimizer.h" #include "optimizer/optimizer.h"
#include "utils/array.h" #include "utils/array.h"
#include "utils/inval.h" #include "utils/inval.h"
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "nodes/makefuncs.h" #include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h" #include "nodes/nodeFuncs.h"
#include "nodes/pathnodes.h"
#include "nodes/plannodes.h" #include "nodes/plannodes.h"
#include "nodes/relation.h"
#include "parser/parse_coerce.h" #include "parser/parse_coerce.h"
#include "parser/parse_relation.h" #include "parser/parse_relation.h"
#include "parser/parsetree.h" #include "parser/parsetree.h"
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "optimizer/clauses.h" #include "optimizer/clauses.h"
#include "optimizer/optimizer.h" #include "optimizer/optimizer.h"
#include "nodes/nodes.h" #include "nodes/nodes.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
#include "statistics/extended_stats_internal.h" #include "statistics/extended_stats_internal.h"
#include "statistics/statistics.h" #include "statistics/statistics.h"
#include "utils/bytea.h" #include "utils/bytea.h"
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "catalog/indexing.h" #include "catalog/indexing.h"
#include "catalog/pg_collation.h" #include "catalog/pg_collation.h"
#include "catalog/pg_statistic_ext.h" #include "catalog/pg_statistic_ext.h"
#include "nodes/relation.h"
#include "postmaster/autovacuum.h" #include "postmaster/autovacuum.h"
#include "statistics/extended_stats_internal.h" #include "statistics/extended_stats_internal.h"
#include "statistics/statistics.h" #include "statistics/statistics.h"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#define TSMAPI_H #define TSMAPI_H
#include "nodes/execnodes.h" #include "nodes/execnodes.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
/* /*
......
...@@ -87,7 +87,7 @@ extern PGDLLIMPORT ExecutorCheckPerms_hook_type ExecutorCheckPerms_hook; ...@@ -87,7 +87,7 @@ extern PGDLLIMPORT ExecutorCheckPerms_hook_type ExecutorCheckPerms_hook;
/* /*
* prototypes from functions in execAmi.c * 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 ExecReScan(PlanState *node);
extern void ExecMarkPos(PlanState *node); extern void ExecMarkPos(PlanState *node);
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "access/parallel.h" #include "access/parallel.h"
#include "nodes/execnodes.h" #include "nodes/execnodes.h"
#include "nodes/extensible.h"
/* /*
* General executor code * General executor code
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "access/parallel.h" #include "access/parallel.h"
#include "nodes/execnodes.h" #include "nodes/execnodes.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
/* To avoid including explain.h here, reference ExplainState thus: */ /* To avoid including explain.h here, reference ExplainState thus: */
struct ExplainState; struct ExplainState;
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include "access/parallel.h" #include "access/parallel.h"
#include "commands/explain.h" #include "commands/explain.h"
#include "nodes/execnodes.h" #include "nodes/execnodes.h"
#include "nodes/pathnodes.h"
#include "nodes/plannodes.h" #include "nodes/plannodes.h"
#include "nodes/relation.h"
/* maximum length of an extensible node identifier */ /* maximum length of an extensible node identifier */
#define EXTNODENAME_MAX_LEN 64 #define EXTNODENAME_MAX_LEN 64
......
...@@ -215,7 +215,7 @@ typedef enum NodeTag ...@@ -215,7 +215,7 @@ typedef enum NodeTag
T_DomainConstraintState, T_DomainConstraintState,
/* /*
* TAGS FOR PLANNER NODES (relation.h) * TAGS FOR PLANNER NODES (pathnodes.h)
*/ */
T_PlannerInfo, T_PlannerInfo,
T_PlannerGlobal, T_PlannerGlobal,
...@@ -741,7 +741,7 @@ typedef enum JoinType ...@@ -741,7 +741,7 @@ typedef enum JoinType
* AggStrategy - * AggStrategy -
* overall execution strategies for Agg plan nodes * 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 typedef enum AggStrategy
{ {
...@@ -755,7 +755,7 @@ typedef enum AggStrategy ...@@ -755,7 +755,7 @@ typedef enum AggStrategy
* AggSplit - * AggSplit -
* splitting (partial aggregation) modes for Agg plan nodes * 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: */ /* Primitive options supported by nodeAgg.c: */
...@@ -785,7 +785,7 @@ typedef enum AggSplit ...@@ -785,7 +785,7 @@ typedef enum AggSplit
* SetOpCmd and SetOpStrategy - * SetOpCmd and SetOpStrategy -
* overall semantics and execution strategies for SetOp plan nodes * 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 typedef enum SetOpCmd
{ {
......
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* *
* relation.h * pathnodes.h
* Definitions for planner's internal data structures. * Definitions for planner's internal data structures, especially Paths.
* *
* *
* Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* src/include/nodes/relation.h * src/include/nodes/pathnodes.h
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#ifndef RELATION_H #ifndef PATHNODES_H
#define RELATION_H #define PATHNODES_H
#include "access/sdir.h" #include "access/sdir.h"
#include "fmgr.h" #include "fmgr.h"
...@@ -2433,4 +2433,4 @@ typedef struct JoinCostWorkspace ...@@ -2433,4 +2433,4 @@ typedef struct JoinCostWorkspace
double inner_rows_total; double inner_rows_total;
} JoinCostWorkspace; } JoinCostWorkspace;
#endif /* RELATION_H */ #endif /* PATHNODES_H */
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#ifndef APPENDINFO_H #ifndef APPENDINFO_H
#define APPENDINFO_H #define APPENDINFO_H
#include "nodes/relation.h" #include "nodes/pathnodes.h"
#include "utils/relcache.h" #include "utils/relcache.h"
extern AppendRelInfo *make_append_rel_info(Relation parentrel, extern AppendRelInfo *make_append_rel_info(Relation parentrel,
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#define CLAUSES_H #define CLAUSES_H
#include "access/htup.h" #include "access/htup.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
typedef struct typedef struct
{ {
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#ifndef COST_H #ifndef COST_H
#define COST_H #define COST_H
#include "nodes/pathnodes.h"
#include "nodes/plannodes.h" #include "nodes/plannodes.h"
#include "nodes/relation.h"
/* defaults for costsize.c's Cost parameters */ /* defaults for costsize.c's Cost parameters */
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#ifndef GEQO_H #ifndef GEQO_H
#define GEQO_H #define GEQO_H
#include "nodes/relation.h" #include "nodes/pathnodes.h"
#include "optimizer/geqo_gene.h" #include "optimizer/geqo_gene.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#ifndef INHERIT_H #ifndef INHERIT_H
#define INHERIT_H #define INHERIT_H
#include "nodes/relation.h" #include "nodes/pathnodes.h"
extern void expand_inherited_tables(PlannerInfo *root); extern void expand_inherited_tables(PlannerInfo *root);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#ifndef JOININFO_H #ifndef JOININFO_H
#define JOININFO_H #define JOININFO_H
#include "nodes/relation.h" #include "nodes/pathnodes.h"
extern bool have_relevant_joinclause(PlannerInfo *root, extern bool have_relevant_joinclause(PlannerInfo *root,
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
#include "nodes/parsenodes.h" #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. * code should generally treat PlannerInfo as an opaque typedef.
* But we'd like such code to use that typedef name, so define the * 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 #ifndef HAVE_PLANNERINFO_TYPEDEF
typedef struct PlannerInfo PlannerInfo; typedef struct PlannerInfo PlannerInfo;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#ifndef ORCLAUSES_H #ifndef ORCLAUSES_H
#define ORCLAUSES_H #define ORCLAUSES_H
#include "nodes/relation.h" #include "nodes/pathnodes.h"
extern void extract_restriction_or_clauses(PlannerInfo *root); extern void extract_restriction_or_clauses(PlannerInfo *root);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#ifndef PARAMASSIGN_H #ifndef PARAMASSIGN_H
#define 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_var(PlannerInfo *root, Var *var);
extern Param *replace_outer_placeholdervar(PlannerInfo *root, extern Param *replace_outer_placeholdervar(PlannerInfo *root,
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#define PATHNODE_H #define PATHNODE_H
#include "nodes/bitmapset.h" #include "nodes/bitmapset.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
/* /*
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#ifndef PATHS_H #ifndef PATHS_H
#define PATHS_H #define PATHS_H
#include "nodes/relation.h" #include "nodes/pathnodes.h"
/* /*
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#ifndef PLACEHOLDER_H #ifndef PLACEHOLDER_H
#define PLACEHOLDER_H #define PLACEHOLDER_H
#include "nodes/relation.h" #include "nodes/pathnodes.h"
extern PlaceHolderVar *make_placeholder_expr(PlannerInfo *root, Expr *expr, extern PlaceHolderVar *make_placeholder_expr(PlannerInfo *root, Expr *expr,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#ifndef PLANCAT_H #ifndef PLANCAT_H
#define PLANCAT_H #define PLANCAT_H
#include "nodes/relation.h" #include "nodes/pathnodes.h"
#include "utils/relcache.h" #include "utils/relcache.h"
/* Hook for plugins to get control in get_relation_info() */ /* Hook for plugins to get control in get_relation_info() */
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#ifndef PLANMAIN_H #ifndef PLANMAIN_H
#define PLANMAIN_H #define PLANMAIN_H
#include "nodes/pathnodes.h"
#include "nodes/plannodes.h" #include "nodes/plannodes.h"
#include "nodes/relation.h"
/* GUC parameters */ /* GUC parameters */
#define DEFAULT_CURSOR_TUPLE_FRACTION 0.1 #define DEFAULT_CURSOR_TUPLE_FRACTION 0.1
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
#ifndef PLANNER_H #ifndef PLANNER_H
#define PLANNER_H #define PLANNER_H
#include "nodes/pathnodes.h"
#include "nodes/plannodes.h" #include "nodes/plannodes.h"
#include "nodes/relation.h"
/* Hook for plugins to get control in planner() */ /* Hook for plugins to get control in planner() */
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#ifndef PREP_H #ifndef PREP_H
#define PREP_H #define PREP_H
#include "nodes/pathnodes.h"
#include "nodes/plannodes.h" #include "nodes/plannodes.h"
#include "nodes/relation.h"
/* /*
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#ifndef RESTRICTINFO_H #ifndef RESTRICTINFO_H
#define RESTRICTINFO_H #define RESTRICTINFO_H
#include "nodes/relation.h" #include "nodes/pathnodes.h"
/* Convenience macro for the common case of a valid-everywhere qual */ /* Convenience macro for the common case of a valid-everywhere qual */
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
#ifndef SUBSELECT_H #ifndef SUBSELECT_H
#define SUBSELECT_H #define SUBSELECT_H
#include "nodes/pathnodes.h"
#include "nodes/plannodes.h" #include "nodes/plannodes.h"
#include "nodes/relation.h"
extern void SS_process_ctes(PlannerInfo *root); extern void SS_process_ctes(PlannerInfo *root);
extern JoinExpr *convert_ANY_sublink_to_join(PlannerInfo *root, extern JoinExpr *convert_ANY_sublink_to_join(PlannerInfo *root,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#ifndef TLIST_H #ifndef TLIST_H
#define TLIST_H #define TLIST_H
#include "nodes/relation.h" #include "nodes/pathnodes.h"
extern TargetEntry *tlist_member(Expr *node, List *targetlist); extern TargetEntry *tlist_member(Expr *node, List *targetlist);
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
#define PARTPRUNE_H #define PARTPRUNE_H
#include "nodes/execnodes.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 ...@@ -71,12 +72,12 @@ typedef struct PartitionPruneContext
#define PruneCxtStateIdx(partnatts, step_id, keyno) \ #define PruneCxtStateIdx(partnatts, step_id, keyno) \
((partnatts) * (step_id) + (keyno)) ((partnatts) * (step_id) + (keyno))
extern PartitionPruneInfo *make_partition_pruneinfo(PlannerInfo *root, extern PartitionPruneInfo *make_partition_pruneinfo(struct PlannerInfo *root,
RelOptInfo *parentrel, struct RelOptInfo *parentrel,
List *subpaths, List *subpaths,
List *partitioned_rels, List *partitioned_rels,
List *prunequal); 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, extern Bitmapset *get_matching_partitions(PartitionPruneContext *context,
List *pruning_steps); List *pruning_steps);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define STATISTICS_H #define STATISTICS_H
#include "commands/vacuum.h" #include "commands/vacuum.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
#define STATS_MAX_DIMENSIONS 8 /* max number of attributes */ #define STATS_MAX_DIMENSIONS 8 /* max number of attributes */
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "fmgr.h" #include "fmgr.h"
#include "access/htup.h" #include "access/htup.h"
#include "nodes/relation.h" #include "nodes/pathnodes.h"
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment