summaryrefslogtreecommitdiff
path: root/src/include/optimizer
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-05-22 13:04:48 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-05-22 13:04:48 -0400
commit8255c7a5eeba8f1a38b7a431c04909bde4f5e67d (patch)
tree50b5b32eaf388701b2714244a10fb23f8d4a2c7c /src/include/optimizer
parentbe76af171cdb3e7465c4ef234af403f97ad79b7b (diff)
downloadpostgresql-8255c7a5eeba8f1a38b7a431c04909bde4f5e67d.tar.gz
Phase 2 pgindent run for v12.
Switch to 2.1 version of pg_bsd_indent. This formats multiline function declarations "correctly", that is with additional lines of parameter declarations indented to match where the first line's left parenthesis is. Discussion: https://postgr.es/m/CAEepm=0P3FeTXRcU5B2W3jv3PgRVZ-kGUXLGfd42FFhUROO3ug@mail.gmail.com
Diffstat (limited to 'src/include/optimizer')
-rw-r--r--src/include/optimizer/appendinfo.h16
-rw-r--r--src/include/optimizer/clauses.h4
-rw-r--r--src/include/optimizer/cost.h162
-rw-r--r--src/include/optimizer/geqo.h2
-rw-r--r--src/include/optimizer/geqo_recombination.h20
-rw-r--r--src/include/optimizer/geqo_selection.h4
-rw-r--r--src/include/optimizer/inherit.h6
-rw-r--r--src/include/optimizer/joininfo.h10
-rw-r--r--src/include/optimizer/optimizer.h58
-rw-r--r--src/include/optimizer/paramassign.h10
-rw-r--r--src/include/optimizer/pathnode.h430
-rw-r--r--src/include/optimizer/paths.h164
-rw-r--r--src/include/optimizer/placeholder.h10
-rw-r--r--src/include/optimizer/plancat.h40
-rw-r--r--src/include/optimizer/planmain.h56
-rw-r--r--src/include/optimizer/planner.h10
-rw-r--r--src/include/optimizer/restrictinfo.h28
-rw-r--r--src/include/optimizer/subselect.h18
-rw-r--r--src/include/optimizer/tlist.h6
19 files changed, 527 insertions, 527 deletions
diff --git a/src/include/optimizer/appendinfo.h b/src/include/optimizer/appendinfo.h
index 790914c1b0..9fdb6a6036 100644
--- a/src/include/optimizer/appendinfo.h
+++ b/src/include/optimizer/appendinfo.h
@@ -18,18 +18,18 @@
#include "utils/relcache.h"
extern AppendRelInfo *make_append_rel_info(Relation parentrel,
- Relation childrel,
- Index parentRTindex, Index childRTindex);
+ Relation childrel,
+ Index parentRTindex, Index childRTindex);
extern Node *adjust_appendrel_attrs(PlannerInfo *root, Node *node,
- int nappinfos, AppendRelInfo **appinfos);
+ int nappinfos, AppendRelInfo **appinfos);
extern Node *adjust_appendrel_attrs_multilevel(PlannerInfo *root, Node *node,
- Relids child_relids,
- Relids top_parent_relids);
+ Relids child_relids,
+ Relids top_parent_relids);
extern Relids adjust_child_relids(Relids relids, int nappinfos,
- AppendRelInfo **appinfos);
+ AppendRelInfo **appinfos);
extern Relids adjust_child_relids_multilevel(PlannerInfo *root, Relids relids,
- Relids child_relids, Relids top_parent_relids);
+ Relids child_relids, Relids top_parent_relids);
extern AppendRelInfo **find_appinfos_by_relids(PlannerInfo *root,
- Relids relids, int *nappinfos);
+ Relids relids, int *nappinfos);
#endif /* APPENDINFO_H */
diff --git a/src/include/optimizer/clauses.h b/src/include/optimizer/clauses.h
index 5e10fb1d50..2f9aeec4a7 100644
--- a/src/include/optimizer/clauses.h
+++ b/src/include/optimizer/clauses.h
@@ -26,7 +26,7 @@ typedef struct
extern bool contain_agg_clause(Node *clause);
extern void get_agg_clause_costs(PlannerInfo *root, Node *clause,
- AggSplit aggsplit, AggClauseCosts *costs);
+ AggSplit aggsplit, AggClauseCosts *costs);
extern bool contain_window_function(Node *clause);
extern WindowFuncLists *find_window_functions(Node *clause, Index maxWinRef);
@@ -53,6 +53,6 @@ extern int NumRelids(Node *clause);
extern void CommuteOpExpr(OpExpr *clause);
extern Query *inline_set_returning_function(PlannerInfo *root,
- RangeTblEntry *rte);
+ RangeTblEntry *rte);
#endif /* CLAUSES_H */
diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h
index ac6de0f6be..9b6bdbc518 100644
--- a/src/include/optimizer/cost.h
+++ b/src/include/optimizer/cost.h
@@ -67,136 +67,136 @@ extern PGDLLIMPORT bool enable_partition_pruning;
extern PGDLLIMPORT int constraint_exclusion;
extern double index_pages_fetched(double tuples_fetched, BlockNumber pages,
- double index_pages, PlannerInfo *root);
+ double index_pages, PlannerInfo *root);
extern void cost_seqscan(Path *path, PlannerInfo *root, RelOptInfo *baserel,
- ParamPathInfo *param_info);
+ ParamPathInfo *param_info);
extern void cost_samplescan(Path *path, PlannerInfo *root, RelOptInfo *baserel,
- ParamPathInfo *param_info);
+ ParamPathInfo *param_info);
extern void cost_index(IndexPath *path, PlannerInfo *root,
- double loop_count, bool partial_path);
+ double loop_count, bool partial_path);
extern void cost_bitmap_heap_scan(Path *path, PlannerInfo *root, RelOptInfo *baserel,
- ParamPathInfo *param_info,
- Path *bitmapqual, double loop_count);
+ ParamPathInfo *param_info,
+ Path *bitmapqual, double loop_count);
extern void cost_bitmap_and_node(BitmapAndPath *path, PlannerInfo *root);
extern void cost_bitmap_or_node(BitmapOrPath *path, PlannerInfo *root);
extern void cost_bitmap_tree_node(Path *path, Cost *cost, Selectivity *selec);
extern void cost_tidscan(Path *path, PlannerInfo *root,
- RelOptInfo *baserel, List *tidquals, ParamPathInfo *param_info);
+ RelOptInfo *baserel, List *tidquals, ParamPathInfo *param_info);
extern void cost_subqueryscan(SubqueryScanPath *path, PlannerInfo *root,
- RelOptInfo *baserel, ParamPathInfo *param_info);
+ RelOptInfo *baserel, ParamPathInfo *param_info);
extern void cost_functionscan(Path *path, PlannerInfo *root,
- RelOptInfo *baserel, ParamPathInfo *param_info);
+ RelOptInfo *baserel, ParamPathInfo *param_info);
extern void cost_tableexprscan(Path *path, PlannerInfo *root,
- RelOptInfo *baserel, ParamPathInfo *param_info);
+ RelOptInfo *baserel, ParamPathInfo *param_info);
extern void cost_valuesscan(Path *path, PlannerInfo *root,
- RelOptInfo *baserel, ParamPathInfo *param_info);
+ RelOptInfo *baserel, ParamPathInfo *param_info);
extern void cost_tablefuncscan(Path *path, PlannerInfo *root,
- RelOptInfo *baserel, ParamPathInfo *param_info);
+ RelOptInfo *baserel, ParamPathInfo *param_info);
extern void cost_ctescan(Path *path, PlannerInfo *root,
- RelOptInfo *baserel, ParamPathInfo *param_info);
-extern void cost_namedtuplestorescan(Path *path, PlannerInfo *root,
RelOptInfo *baserel, ParamPathInfo *param_info);
+extern void cost_namedtuplestorescan(Path *path, PlannerInfo *root,
+ RelOptInfo *baserel, ParamPathInfo *param_info);
extern void cost_resultscan(Path *path, PlannerInfo *root,
- RelOptInfo *baserel, ParamPathInfo *param_info);
+ RelOptInfo *baserel, ParamPathInfo *param_info);
extern void cost_recursive_union(Path *runion, Path *nrterm, Path *rterm);
extern void cost_sort(Path *path, PlannerInfo *root,
- List *pathkeys, Cost input_cost, double tuples, int width,
- Cost comparison_cost, int sort_mem,
- double limit_tuples);
+ List *pathkeys, Cost input_cost, double tuples, int width,
+ Cost comparison_cost, int sort_mem,
+ double limit_tuples);
extern void cost_append(AppendPath *path);
extern void cost_merge_append(Path *path, PlannerInfo *root,
- List *pathkeys, int n_streams,
- Cost input_startup_cost, Cost input_total_cost,
- double tuples);
+ List *pathkeys, int n_streams,
+ Cost input_startup_cost, Cost input_total_cost,
+ double tuples);
extern void cost_material(Path *path,
- Cost input_startup_cost, Cost input_total_cost,
- double tuples, int width);
+ Cost input_startup_cost, Cost input_total_cost,
+ double tuples, int width);
extern void cost_agg(Path *path, PlannerInfo *root,
- AggStrategy aggstrategy, const AggClauseCosts *aggcosts,
- int numGroupCols, double numGroups,
- List *quals,
- Cost input_startup_cost, Cost input_total_cost,
- double input_tuples);
+ AggStrategy aggstrategy, const AggClauseCosts *aggcosts,
+ int numGroupCols, double numGroups,
+ List *quals,
+ Cost input_startup_cost, Cost input_total_cost,
+ double input_tuples);
extern void cost_windowagg(Path *path, PlannerInfo *root,
- List *windowFuncs, int numPartCols, int numOrderCols,
- Cost input_startup_cost, Cost input_total_cost,
- double input_tuples);
+ List *windowFuncs, int numPartCols, int numOrderCols,
+ Cost input_startup_cost, Cost input_total_cost,
+ double input_tuples);
extern void cost_group(Path *path, PlannerInfo *root,
- int numGroupCols, double numGroups,
- List *quals,
- Cost input_startup_cost, Cost input_total_cost,
- double input_tuples);
+ int numGroupCols, double numGroups,
+ List *quals,
+ Cost input_startup_cost, Cost input_total_cost,
+ double input_tuples);
extern void initial_cost_nestloop(PlannerInfo *root,
- JoinCostWorkspace *workspace,
- JoinType jointype,
- Path *outer_path, Path *inner_path,
- JoinPathExtraData *extra);
+ JoinCostWorkspace *workspace,
+ JoinType jointype,
+ Path *outer_path, Path *inner_path,
+ JoinPathExtraData *extra);
extern void final_cost_nestloop(PlannerInfo *root, NestPath *path,
- JoinCostWorkspace *workspace,
- JoinPathExtraData *extra);
+ JoinCostWorkspace *workspace,
+ JoinPathExtraData *extra);
extern void initial_cost_mergejoin(PlannerInfo *root,
- JoinCostWorkspace *workspace,
- JoinType jointype,
- List *mergeclauses,
- Path *outer_path, Path *inner_path,
- List *outersortkeys, List *innersortkeys,
- JoinPathExtraData *extra);
+ JoinCostWorkspace *workspace,
+ JoinType jointype,
+ List *mergeclauses,
+ Path *outer_path, Path *inner_path,
+ List *outersortkeys, List *innersortkeys,
+ JoinPathExtraData *extra);
extern void final_cost_mergejoin(PlannerInfo *root, MergePath *path,
- JoinCostWorkspace *workspace,
- JoinPathExtraData *extra);
+ JoinCostWorkspace *workspace,
+ JoinPathExtraData *extra);
extern void initial_cost_hashjoin(PlannerInfo *root,
- JoinCostWorkspace *workspace,
- JoinType jointype,
- List *hashclauses,
- Path *outer_path, Path *inner_path,
- JoinPathExtraData *extra,
- bool parallel_hash);
+ JoinCostWorkspace *workspace,
+ JoinType jointype,
+ List *hashclauses,
+ Path *outer_path, Path *inner_path,
+ JoinPathExtraData *extra,
+ bool parallel_hash);
extern void final_cost_hashjoin(PlannerInfo *root, HashPath *path,
- JoinCostWorkspace *workspace,
- JoinPathExtraData *extra);
+ JoinCostWorkspace *workspace,
+ JoinPathExtraData *extra);
extern void cost_gather(GatherPath *path, PlannerInfo *root,
- RelOptInfo *baserel, ParamPathInfo *param_info, double *rows);
+ RelOptInfo *baserel, ParamPathInfo *param_info, double *rows);
extern void cost_gather_merge(GatherMergePath *path, PlannerInfo *root,
- RelOptInfo *rel, ParamPathInfo *param_info,
- Cost input_startup_cost, Cost input_total_cost,
- double *rows);
+ RelOptInfo *rel, ParamPathInfo *param_info,
+ Cost input_startup_cost, Cost input_total_cost,
+ double *rows);
extern void cost_subplan(PlannerInfo *root, SubPlan *subplan, Plan *plan);
extern void cost_qual_eval(QualCost *cost, List *quals, PlannerInfo *root);
extern void cost_qual_eval_node(QualCost *cost, Node *qual, PlannerInfo *root);
extern void compute_semi_anti_join_factors(PlannerInfo *root,
- RelOptInfo *joinrel,
- RelOptInfo *outerrel,
- RelOptInfo *innerrel,
- JoinType jointype,
- SpecialJoinInfo *sjinfo,
- List *restrictlist,
- SemiAntiJoinFactors *semifactors);
+ RelOptInfo *joinrel,
+ RelOptInfo *outerrel,
+ RelOptInfo *innerrel,
+ JoinType jointype,
+ SpecialJoinInfo *sjinfo,
+ List *restrictlist,
+ SemiAntiJoinFactors *semifactors);
extern void set_baserel_size_estimates(PlannerInfo *root, RelOptInfo *rel);
extern double get_parameterized_baserel_size(PlannerInfo *root,
- RelOptInfo *rel,
- List *param_clauses);
+ RelOptInfo *rel,
+ List *param_clauses);
extern double get_parameterized_joinrel_size(PlannerInfo *root,
- RelOptInfo *rel,
- Path *outer_path,
- Path *inner_path,
- SpecialJoinInfo *sjinfo,
- List *restrict_clauses);
+ RelOptInfo *rel,
+ Path *outer_path,
+ Path *inner_path,
+ SpecialJoinInfo *sjinfo,
+ List *restrict_clauses);
extern void set_joinrel_size_estimates(PlannerInfo *root, RelOptInfo *rel,
- RelOptInfo *outer_rel,
- RelOptInfo *inner_rel,
- SpecialJoinInfo *sjinfo,
- List *restrictlist);
+ RelOptInfo *outer_rel,
+ RelOptInfo *inner_rel,
+ SpecialJoinInfo *sjinfo,
+ List *restrictlist);
extern void set_subquery_size_estimates(PlannerInfo *root, RelOptInfo *rel);
extern void set_function_size_estimates(PlannerInfo *root, RelOptInfo *rel);
extern void set_values_size_estimates(PlannerInfo *root, RelOptInfo *rel);
extern void set_cte_size_estimates(PlannerInfo *root, RelOptInfo *rel,
- double cte_rows);
+ double cte_rows);
extern void set_tablefunc_size_estimates(PlannerInfo *root, RelOptInfo *rel);
extern void set_namedtuplestore_size_estimates(PlannerInfo *root, RelOptInfo *rel);
extern void set_result_size_estimates(PlannerInfo *root, RelOptInfo *rel);
extern void set_foreign_size_estimates(PlannerInfo *root, RelOptInfo *rel);
extern PathTarget *set_pathtarget_cost_width(PlannerInfo *root, PathTarget *target);
extern double compute_bitmap_pages(PlannerInfo *root, RelOptInfo *baserel,
- Path *bitmapqual, int loop_count, Cost *cost, double *tuple);
+ Path *bitmapqual, int loop_count, Cost *cost, double *tuple);
#endif /* COST_H */
diff --git a/src/include/optimizer/geqo.h b/src/include/optimizer/geqo.h
index 5b3327665e..484b360f1f 100644
--- a/src/include/optimizer/geqo.h
+++ b/src/include/optimizer/geqo.h
@@ -79,7 +79,7 @@ typedef struct
/* routines in geqo_main.c */
extern RelOptInfo *geqo(PlannerInfo *root,
- int number_of_rels, List *initial_rels);
+ int number_of_rels, List *initial_rels);
/* routines in geqo_eval.c */
extern Cost geqo_eval(PlannerInfo *root, Gene *tour, int num_gene);
diff --git a/src/include/optimizer/geqo_recombination.h b/src/include/optimizer/geqo_recombination.h
index d95a063d26..8dfda79cdf 100644
--- a/src/include/optimizer/geqo_recombination.h
+++ b/src/include/optimizer/geqo_recombination.h
@@ -43,10 +43,10 @@ extern Edge *alloc_edge_table(PlannerInfo *root, int num_gene);
extern void free_edge_table(PlannerInfo *root, Edge *edge_table);
extern float gimme_edge_table(PlannerInfo *root, Gene *tour1, Gene *tour2,
- int num_gene, Edge *edge_table);
+ int num_gene, Edge *edge_table);
-extern int gimme_tour(PlannerInfo *root, Edge *edge_table, Gene *new_gene,
- int num_gene);
+extern int gimme_tour(PlannerInfo *root, Edge *edge_table, Gene *new_gene,
+ int num_gene);
/* partially matched crossover [PMX] */
@@ -55,8 +55,8 @@ extern int gimme_tour(PlannerInfo *root, Edge *edge_table, Gene *new_gene,
#define MOM 0 /* indicator for gene from mom */
extern void pmx(PlannerInfo *root,
- Gene *tour1, Gene *tour2,
- Gene *offspring, int num_gene);
+ Gene *tour1, Gene *tour2,
+ Gene *offspring, int num_gene);
typedef struct City
@@ -71,19 +71,19 @@ extern City * alloc_city_table(PlannerInfo *root, int num_gene);
extern void free_city_table(PlannerInfo *root, City * city_table);
/* cycle crossover [CX] */
-extern int cx(PlannerInfo *root, Gene *tour1, Gene *tour2,
- Gene *offspring, int num_gene, City * city_table);
+extern int cx(PlannerInfo *root, Gene *tour1, Gene *tour2,
+ Gene *offspring, int num_gene, City * city_table);
/* position crossover [PX] */
extern void px(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring,
- int num_gene, City * city_table);
+ int num_gene, City * city_table);
/* order crossover [OX1] according to Davis */
extern void ox1(PlannerInfo *root, Gene *mom, Gene *dad, Gene *offspring,
- int num_gene, City * city_table);
+ int num_gene, City * city_table);
/* order crossover [OX2] according to Syswerda */
extern void ox2(PlannerInfo *root, Gene *mom, Gene *dad, Gene *offspring,
- int num_gene, City * city_table);
+ int num_gene, City * city_table);
#endif /* GEQO_RECOMBINATION_H */
diff --git a/src/include/optimizer/geqo_selection.h b/src/include/optimizer/geqo_selection.h
index 1631c6c87e..85c0d21510 100644
--- a/src/include/optimizer/geqo_selection.h
+++ b/src/include/optimizer/geqo_selection.h
@@ -27,7 +27,7 @@
extern void geqo_selection(PlannerInfo *root,
- Chromosome *momma, Chromosome *daddy,
- Pool *pool, double bias);
+ Chromosome *momma, Chromosome *daddy,
+ Pool *pool, double bias);
#endif /* GEQO_SELECTION_H */
diff --git a/src/include/optimizer/inherit.h b/src/include/optimizer/inherit.h
index 02a23e5b1b..f465a526c7 100644
--- a/src/include/optimizer/inherit.h
+++ b/src/include/optimizer/inherit.h
@@ -18,10 +18,10 @@
extern void expand_inherited_rtentry(PlannerInfo *root, RelOptInfo *rel,
- RangeTblEntry *rte, Index rti);
+ RangeTblEntry *rte, Index rti);
extern bool apply_child_basequals(PlannerInfo *root, RelOptInfo *parentrel,
- RelOptInfo *childrel, RangeTblEntry *childRTE,
- AppendRelInfo *appinfo);
+ RelOptInfo *childrel, RangeTblEntry *childRTE,
+ AppendRelInfo *appinfo);
#endif /* INHERIT_H */
diff --git a/src/include/optimizer/joininfo.h b/src/include/optimizer/joininfo.h
index c6e4be6cf4..0807d1901f 100644
--- a/src/include/optimizer/joininfo.h
+++ b/src/include/optimizer/joininfo.h
@@ -18,13 +18,13 @@
extern bool have_relevant_joinclause(PlannerInfo *root,
- RelOptInfo *rel1, RelOptInfo *rel2);
+ RelOptInfo *rel1, RelOptInfo *rel2);
extern void add_join_clause_to_rels(PlannerInfo *root,
- RestrictInfo *restrictinfo,
- Relids join_relids);
+ RestrictInfo *restrictinfo,
+ Relids join_relids);
extern void remove_join_clause_from_rels(PlannerInfo *root,
- RestrictInfo *restrictinfo,
- Relids join_relids);
+ RestrictInfo *restrictinfo,
+ Relids join_relids);
#endif /* JOININFO_H */
diff --git a/src/include/optimizer/optimizer.h b/src/include/optimizer/optimizer.h
index 6086821f20..6b8fd3f285 100644
--- a/src/include/optimizer/optimizer.h
+++ b/src/include/optimizer/optimizer.h
@@ -54,21 +54,21 @@ struct HeapTupleData;
/* in path/clausesel.c: */
extern Selectivity clause_selectivity(PlannerInfo *root,
- Node *clause,
- int varRelid,
- JoinType jointype,
- SpecialJoinInfo *sjinfo);
+ Node *clause,
+ int varRelid,
+ JoinType jointype,
+ SpecialJoinInfo *sjinfo);
extern Selectivity clauselist_selectivity_simple(PlannerInfo *root,
- List *clauses,
- int varRelid,
- JoinType jointype,
- SpecialJoinInfo *sjinfo,
- Bitmapset *estimatedclauses);
+ List *clauses,
+ int varRelid,
+ JoinType jointype,
+ SpecialJoinInfo *sjinfo,
+ Bitmapset *estimatedclauses);
extern Selectivity clauselist_selectivity(PlannerInfo *root,
- List *clauses,
- int varRelid,
- JoinType jointype,
- SpecialJoinInfo *sjinfo);
+ List *clauses,
+ int varRelid,
+ JoinType jointype,
+ SpecialJoinInfo *sjinfo);
/* in path/costsize.c: */
@@ -103,12 +103,12 @@ extern int force_parallel_mode;
extern bool parallel_leader_participation;
extern struct PlannedStmt *planner(Query *parse, int cursorOptions,
- struct ParamListInfoData *boundParams);
+ struct ParamListInfoData *boundParams);
extern Expr *expression_planner(Expr *expr);
extern Expr *expression_planner_with_deps(Expr *expr,
- List **relationOids,
- List **invalItems);
+ List **relationOids,
+ List **invalItems);
extern bool plan_cluster_use_sort(Oid tableOid, Oid indexOid);
extern int plan_create_index_workers(Oid tableOid, Oid indexOid);
@@ -116,9 +116,9 @@ extern int plan_create_index_workers(Oid tableOid, Oid indexOid);
/* in plan/setrefs.c: */
extern void extract_query_dependencies(Node *query,
- List **relationOids,
- List **invalItems,
- bool *hasRowSecurity);
+ List **relationOids,
+ List **invalItems,
+ bool *hasRowSecurity);
/* in prep/prepqual.c: */
@@ -136,33 +136,33 @@ extern Node *eval_const_expressions(PlannerInfo *root, Node *node);
extern Node *estimate_expression_value(PlannerInfo *root, Node *node);
extern Expr *evaluate_expr(Expr *expr, Oid result_type, int32 result_typmod,
- Oid result_collation);
+ Oid result_collation);
extern List *expand_function_arguments(List *args, Oid result_type,
- struct HeapTupleData *func_tuple);
+ struct HeapTupleData *func_tuple);
/* in util/predtest.c: */
extern bool predicate_implied_by(List *predicate_list, List *clause_list,
- bool weak);
+ bool weak);
extern bool predicate_refuted_by(List *predicate_list, List *clause_list,
- bool weak);
+ bool weak);
/* in util/tlist.c: */
extern int count_nonjunk_tlist_entries(List *tlist);
extern TargetEntry *get_sortgroupref_tle(Index sortref,
- List *targetList);
+ List *targetList);
extern TargetEntry *get_sortgroupclause_tle(SortGroupClause *sgClause,
- List *targetList);
+ List *targetList);
extern Node *get_sortgroupclause_expr(SortGroupClause *sgClause,
- List *targetList);
+ List *targetList);
extern List *get_sortgrouplist_exprs(List *sgClauses,
- List *targetList);
+ List *targetList);
extern SortGroupClause *get_sortgroupref_clause(Index sortref,
- List *clauses);
+ List *clauses);
extern SortGroupClause *get_sortgroupref_clause_noerr(Index sortref,
- List *clauses);
+ List *clauses);
/* in util/var.c: */
diff --git a/src/include/optimizer/paramassign.h b/src/include/optimizer/paramassign.h
index e18f420eb4..edf3ed8628 100644
--- a/src/include/optimizer/paramassign.h
+++ b/src/include/optimizer/paramassign.h
@@ -17,18 +17,18 @@
extern Param *replace_outer_var(PlannerInfo *root, Var *var);
extern Param *replace_outer_placeholdervar(PlannerInfo *root,
- PlaceHolderVar *phv);
+ PlaceHolderVar *phv);
extern Param *replace_outer_agg(PlannerInfo *root, Aggref *agg);
extern Param *replace_outer_grouping(PlannerInfo *root, GroupingFunc *grp);
extern Param *replace_nestloop_param_var(PlannerInfo *root, Var *var);
extern Param *replace_nestloop_param_placeholdervar(PlannerInfo *root,
- PlaceHolderVar *phv);
+ PlaceHolderVar *phv);
extern void process_subquery_nestloop_params(PlannerInfo *root,
- List *subplan_params);
+ List *subplan_params);
extern List *identify_current_nestloop_params(PlannerInfo *root,
- Relids leftrelids);
+ Relids leftrelids);
extern Param *generate_new_exec_param(PlannerInfo *root, Oid paramtype,
- int32 paramtypmod, Oid paramcollation);
+ int32 paramtypmod, Oid paramcollation);
extern int assign_special_exec_param(PlannerInfo *root);
#endif /* PARAMASSIGN_H */
diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h
index 437250f557..e70d6a3f18 100644
--- a/src/include/optimizer/pathnode.h
+++ b/src/include/optimizer/pathnode.h
@@ -21,259 +21,259 @@
/*
* prototypes for pathnode.c
*/
-extern int compare_path_costs(Path *path1, Path *path2,
- CostSelector criterion);
-extern int compare_fractional_path_costs(Path *path1, Path *path2,
- double fraction);
+extern int compare_path_costs(Path *path1, Path *path2,
+ CostSelector criterion);
+extern int compare_fractional_path_costs(Path *path1, Path *path2,
+ double fraction);
extern void set_cheapest(RelOptInfo *parent_rel);
extern void add_path(RelOptInfo *parent_rel, Path *new_path);
extern bool add_path_precheck(RelOptInfo *parent_rel,
- Cost startup_cost, Cost total_cost,
- List *pathkeys, Relids required_outer);
+ Cost startup_cost, Cost total_cost,
+ List *pathkeys, Relids required_outer);
extern void add_partial_path(RelOptInfo *parent_rel, Path *new_path);
extern bool add_partial_path_precheck(RelOptInfo *parent_rel,
- Cost total_cost, List *pathkeys);
+ Cost total_cost, List *pathkeys);
extern Path *create_seqscan_path(PlannerInfo *root, RelOptInfo *rel,
- Relids required_outer, int parallel_workers);
+ Relids required_outer, int parallel_workers);
extern Path *create_samplescan_path(PlannerInfo *root, RelOptInfo *rel,
- Relids required_outer);
+ Relids required_outer);
extern IndexPath *create_index_path(PlannerInfo *root,
- IndexOptInfo *index,
- List *indexclauses,
- List *indexorderbys,
- List *indexorderbycols,
- List *pathkeys,
- ScanDirection indexscandir,
- bool indexonly,
- Relids required_outer,
- double loop_count,
- bool partial_path);
+ IndexOptInfo *index,
+ List *indexclauses,
+ List *indexorderbys,
+ List *indexorderbycols,
+ List *pathkeys,
+ ScanDirection indexscandir,
+ bool indexonly,
+ Relids required_outer,
+ double loop_count,
+ bool partial_path);
extern BitmapHeapPath *create_bitmap_heap_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *bitmapqual,
- Relids required_outer,
- double loop_count,
- int parallel_degree);
+ RelOptInfo *rel,
+ Path *bitmapqual,
+ Relids required_outer,
+ double loop_count,
+ int parallel_degree);
extern BitmapAndPath *create_bitmap_and_path(PlannerInfo *root,
- RelOptInfo *rel,
- List *bitmapquals);
+ RelOptInfo *rel,
+ List *bitmapquals);
extern BitmapOrPath *create_bitmap_or_path(PlannerInfo *root,
- RelOptInfo *rel,
- List *bitmapquals);
+ RelOptInfo *rel,
+ List *bitmapquals);
extern TidPath *create_tidscan_path(PlannerInfo *root, RelOptInfo *rel,
- List *tidquals, Relids required_outer);
+ List *tidquals, Relids required_outer);
extern AppendPath *create_append_path(PlannerInfo *root, RelOptInfo *rel,
- List *subpaths, List *partial_subpaths,
- List *pathkeys, Relids required_outer,
- int parallel_workers, bool parallel_aware,
- List *partitioned_rels, double rows);
+ List *subpaths, List *partial_subpaths,
+ List *pathkeys, Relids required_outer,
+ int parallel_workers, bool parallel_aware,
+ List *partitioned_rels, double rows);
extern MergeAppendPath *create_merge_append_path(PlannerInfo *root,
- RelOptInfo *rel,
- List *subpaths,
- List *pathkeys,
- Relids required_outer,
- List *partitioned_rels);
+ RelOptInfo *rel,
+ List *subpaths,
+ List *pathkeys,
+ Relids required_outer,
+ List *partitioned_rels);
extern GroupResultPath *create_group_result_path(PlannerInfo *root,
- RelOptInfo *rel,
- PathTarget *target,
- List *havingqual);
+ RelOptInfo *rel,
+ PathTarget *target,
+ List *havingqual);
extern MaterialPath *create_material_path(RelOptInfo *rel, Path *subpath);
extern UniquePath *create_unique_path(PlannerInfo *root, RelOptInfo *rel,
- Path *subpath, SpecialJoinInfo *sjinfo);
+ Path *subpath, SpecialJoinInfo *sjinfo);
extern GatherPath *create_gather_path(PlannerInfo *root,
- RelOptInfo *rel, Path *subpath, PathTarget *target,
- Relids required_outer, double *rows);
+ RelOptInfo *rel, Path *subpath, PathTarget *target,
+ Relids required_outer, double *rows);
extern GatherMergePath *create_gather_merge_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *subpath,
- PathTarget *target,
- List *pathkeys,
- Relids required_outer,
- double *rows);
+ RelOptInfo *rel,
+ Path *subpath,
+ PathTarget *target,
+ List *pathkeys,
+ Relids required_outer,
+ double *rows);
extern SubqueryScanPath *create_subqueryscan_path(PlannerInfo *root,
- RelOptInfo *rel, Path *subpath,
- List *pathkeys, Relids required_outer);
+ RelOptInfo *rel, Path *subpath,
+ List *pathkeys, Relids required_outer);
extern Path *create_functionscan_path(PlannerInfo *root, RelOptInfo *rel,
- List *pathkeys, Relids required_outer);
+ List *pathkeys, Relids required_outer);
extern Path *create_tablexprscan_path(PlannerInfo *root, RelOptInfo *rel,
- List *pathkeys, Relids required_outer);
+ List *pathkeys, Relids required_outer);
extern Path *create_valuesscan_path(PlannerInfo *root, RelOptInfo *rel,
- Relids required_outer);
+ Relids required_outer);
extern Path *create_tablefuncscan_path(PlannerInfo *root, RelOptInfo *rel,
- Relids required_outer);
+ Relids required_outer);
extern Path *create_ctescan_path(PlannerInfo *root, RelOptInfo *rel,
- Relids required_outer);
+ Relids required_outer);
extern Path *create_namedtuplestorescan_path(PlannerInfo *root, RelOptInfo *rel,
- Relids required_outer);
+ Relids required_outer);
extern Path *create_resultscan_path(PlannerInfo *root, RelOptInfo *rel,
- Relids required_outer);
+ Relids required_outer);
extern Path *create_worktablescan_path(PlannerInfo *root, RelOptInfo *rel,
- Relids required_outer);
+ Relids required_outer);
extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
- PathTarget *target,
- double rows, Cost startup_cost, Cost total_cost,
- List *pathkeys,
- Relids required_outer,
- Path *fdw_outerpath,
- List *fdw_private);
+ PathTarget *target,
+ double rows, Cost startup_cost, Cost total_cost,
+ List *pathkeys,
+ Relids required_outer,
+ Path *fdw_outerpath,
+ List *fdw_private);
extern ForeignPath *create_foreign_join_path(PlannerInfo *root, RelOptInfo *rel,
- PathTarget *target,
- double rows, Cost startup_cost, Cost total_cost,
- List *pathkeys,
- Relids required_outer,
- Path *fdw_outerpath,
- List *fdw_private);
+ PathTarget *target,
+ double rows, Cost startup_cost, Cost total_cost,
+ List *pathkeys,
+ Relids required_outer,
+ Path *fdw_outerpath,
+ List *fdw_private);
extern ForeignPath *create_foreign_upper_path(PlannerInfo *root, RelOptInfo *rel,
- PathTarget *target,
- double rows, Cost startup_cost, Cost total_cost,
- List *pathkeys,
- Path *fdw_outerpath,
- List *fdw_private);
+ PathTarget *target,
+ double rows, Cost startup_cost, Cost total_cost,
+ List *pathkeys,
+ Path *fdw_outerpath,
+ List *fdw_private);
extern Relids calc_nestloop_required_outer(Relids outerrelids,
- Relids outer_paramrels,
- Relids innerrelids,
- Relids inner_paramrels);
+ Relids outer_paramrels,
+ Relids innerrelids,
+ Relids inner_paramrels);
extern Relids calc_non_nestloop_required_outer(Path *outer_path, Path *inner_path);
extern NestPath *create_nestloop_path(PlannerInfo *root,
- RelOptInfo *joinrel,
- JoinType jointype,
- JoinCostWorkspace *workspace,
- JoinPathExtraData *extra,
- Path *outer_path,
- Path *inner_path,
- List *restrict_clauses,
- List *pathkeys,
- Relids required_outer);
+ RelOptInfo *joinrel,
+ JoinType jointype,
+ JoinCostWorkspace *workspace,
+ JoinPathExtraData *extra,
+ Path *outer_path,
+ Path *inner_path,
+ List *restrict_clauses,
+ List *pathkeys,
+ Relids required_outer);
extern MergePath *create_mergejoin_path(PlannerInfo *root,
- RelOptInfo *joinrel,
- JoinType jointype,
- JoinCostWorkspace *workspace,
- JoinPathExtraData *extra,
- Path *outer_path,
- Path *inner_path,
- List *restrict_clauses,
- List *pathkeys,
- Relids required_outer,
- List *mergeclauses,
- List *outersortkeys,
- List *innersortkeys);
+ RelOptInfo *joinrel,
+ JoinType jointype,
+ JoinCostWorkspace *workspace,
+ JoinPathExtraData *extra,
+ Path *outer_path,
+ Path *inner_path,
+ List *restrict_clauses,
+ List *pathkeys,
+ Relids required_outer,
+ List *mergeclauses,
+ List *outersortkeys,
+ List *innersortkeys);
extern HashPath *create_hashjoin_path(PlannerInfo *root,
- RelOptInfo *joinrel,
- JoinType jointype,
- JoinCostWorkspace *workspace,
- JoinPathExtraData *extra,
- Path *outer_path,
- Path *inner_path,
- bool parallel_hash,
- List *restrict_clauses,
- Relids required_outer,
- List *hashclauses);
+ RelOptInfo *joinrel,
+ JoinType jointype,
+ JoinCostWorkspace *workspace,
+ JoinPathExtraData *extra,
+ Path *outer_path,
+ Path *inner_path,
+ bool parallel_hash,
+ List *restrict_clauses,
+ Relids required_outer,
+ List *hashclauses);
extern ProjectionPath *create_projection_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *subpath,
- PathTarget *target);
+ RelOptInfo *rel,
+ Path *subpath,
+ PathTarget *target);
extern Path *apply_projection_to_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *path,
- PathTarget *target);
+ RelOptInfo *rel,
+ Path *path,
+ PathTarget *target);
extern ProjectSetPath *create_set_projection_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *subpath,
- PathTarget *target);
+ RelOptInfo *rel,
+ Path *subpath,
+ PathTarget *target);
extern SortPath *create_sort_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *subpath,
- List *pathkeys,
- double limit_tuples);
+ RelOptInfo *rel,
+ Path *subpath,
+ List *pathkeys,
+ double limit_tuples);
extern GroupPath *create_group_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *subpath,
- List *groupClause,
- List *qual,
- double numGroups);
+ RelOptInfo *rel,
+ Path *subpath,
+ List *groupClause,
+ List *qual,
+ double numGroups);
extern UpperUniquePath *create_upper_unique_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *subpath,
- int numCols,
- double numGroups);
+ RelOptInfo *rel,
+ Path *subpath,
+ int numCols,
+ double numGroups);
extern AggPath *create_agg_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *subpath,
- PathTarget *target,
- AggStrategy aggstrategy,
- AggSplit aggsplit,
- List *groupClause,
- List *qual,
- const AggClauseCosts *aggcosts,
- double numGroups);
+ RelOptInfo *rel,
+ Path *subpath,
+ PathTarget *target,
+ AggStrategy aggstrategy,
+ AggSplit aggsplit,
+ List *groupClause,
+ List *qual,
+ const AggClauseCosts *aggcosts,
+ double numGroups);
extern GroupingSetsPath *create_groupingsets_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *subpath,
- List *having_qual,
- AggStrategy aggstrategy,
- List *rollups,
- const AggClauseCosts *agg_costs,
- double numGroups);
+ RelOptInfo *rel,
+ Path *subpath,
+ List *having_qual,
+ AggStrategy aggstrategy,
+ List *rollups,
+ const AggClauseCosts *agg_costs,
+ double numGroups);
extern MinMaxAggPath *create_minmaxagg_path(PlannerInfo *root,
- RelOptInfo *rel,
- PathTarget *target,
- List *mmaggregates,
- List *quals);
+ RelOptInfo *rel,
+ PathTarget *target,
+ List *mmaggregates,
+ List *quals);
extern WindowAggPath *create_windowagg_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *subpath,
- PathTarget *target,
- List *windowFuncs,
- WindowClause *winclause);
+ RelOptInfo *rel,
+ Path *subpath,
+ PathTarget *target,
+ List *windowFuncs,
+ WindowClause *winclause);
extern SetOpPath *create_setop_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *subpath,
- SetOpCmd cmd,
- SetOpStrategy strategy,
- List *distinctList,
- AttrNumber flagColIdx,
- int firstFlag,
- double numGroups,
- double outputRows);
+ RelOptInfo *rel,
+ Path *subpath,
+ SetOpCmd cmd,
+ SetOpStrategy strategy,
+ List *distinctList,
+ AttrNumber flagColIdx,
+ int firstFlag,
+ double numGroups,
+ double outputRows);
extern RecursiveUnionPath *create_recursiveunion_path(PlannerInfo *root,
- RelOptInfo *rel,
- Path *leftpath,
- Path *rightpath,
- PathTarget *target,
- List *distinctList,
- int wtParam,
- double numGroups);
+ RelOptInfo *rel,
+ Path *leftpath,
+ Path *rightpath,
+ PathTarget *target,
+ List *distinctList,
+ int wtParam,
+ double numGroups);
extern LockRowsPath *create_lockrows_path(PlannerInfo *root, RelOptInfo *rel,
- Path *subpath, List *rowMarks, int epqParam);
+ Path *subpath, List *rowMarks, int epqParam);
extern ModifyTablePath *create_modifytable_path(PlannerInfo *root,
- RelOptInfo *rel,
- CmdType operation, bool canSetTag,
- Index nominalRelation, Index rootRelation,
- bool partColsUpdated,
- List *resultRelations, List *subpaths,
- List *subroots,
- List *withCheckOptionLists, List *returningLists,
- List *rowMarks, OnConflictExpr *onconflict,
- int epqParam);
+ RelOptInfo *rel,
+ CmdType operation, bool canSetTag,
+ Index nominalRelation, Index rootRelation,
+ bool partColsUpdated,
+ List *resultRelations, List *subpaths,
+ List *subroots,
+ List *withCheckOptionLists, List *returningLists,
+ List *rowMarks, OnConflictExpr *onconflict,
+ int epqParam);
extern LimitPath *create_limit_path(PlannerInfo *root, RelOptInfo *rel,
- Path *subpath,
- Node *limitOffset, Node *limitCount,
- int64 offset_est, int64 count_est);
+ Path *subpath,
+ Node *limitOffset, Node *limitCount,
+ int64 offset_est, int64 count_est);
extern void adjust_limit_rows_costs(double *rows,
- Cost *startup_cost, Cost *total_cost,
- int64 offset_est, int64 count_est);
+ Cost *startup_cost, Cost *total_cost,
+ int64 offset_est, int64 count_est);
extern Path *reparameterize_path(PlannerInfo *root, Path *path,
- Relids required_outer,
- double loop_count);
+ Relids required_outer,
+ double loop_count);
extern Path *reparameterize_path_by_child(PlannerInfo *root, Path *path,
- RelOptInfo *child_rel);
+ RelOptInfo *child_rel);
/*
* prototypes for relnode.c
@@ -282,39 +282,39 @@ extern void setup_simple_rel_arrays(PlannerInfo *root);
extern void setup_append_rel_array(PlannerInfo *root);
extern void expand_planner_arrays(PlannerInfo *root, int add_size);
extern RelOptInfo *build_simple_rel(PlannerInfo *root, int relid,
- RelOptInfo *parent);
+ RelOptInfo *parent);
extern RelOptInfo *find_base_rel(PlannerInfo *root, int relid);
extern RelOptInfo *find_join_rel(PlannerInfo *root, Relids relids);
extern RelOptInfo *build_join_rel(PlannerInfo *root,
- Relids joinrelids,
- RelOptInfo *outer_rel,
- RelOptInfo *inner_rel,
- SpecialJoinInfo *sjinfo,
- List **restrictlist_ptr);
+ Relids joinrelids,
+ RelOptInfo *outer_rel,
+ RelOptInfo *inner_rel,
+ SpecialJoinInfo *sjinfo,
+ List **restrictlist_ptr);
extern Relids min_join_parameterization(PlannerInfo *root,
- Relids joinrelids,
- RelOptInfo *outer_rel,
- RelOptInfo *inner_rel);
+ Relids joinrelids,
+ RelOptInfo *outer_rel,
+ RelOptInfo *inner_rel);
extern RelOptInfo *fetch_upper_rel(PlannerInfo *root, UpperRelationKind kind,
- Relids relids);
+ Relids relids);
extern Relids find_childrel_parents(PlannerInfo *root, RelOptInfo *rel);
extern ParamPathInfo *get_baserel_parampathinfo(PlannerInfo *root,
- RelOptInfo *baserel,
- Relids required_outer);
+ RelOptInfo *baserel,
+ Relids required_outer);
extern ParamPathInfo *get_joinrel_parampathinfo(PlannerInfo *root,
- RelOptInfo *joinrel,
- Path *outer_path,
- Path *inner_path,
- SpecialJoinInfo *sjinfo,
- Relids required_outer,
- List **restrict_clauses);
+ RelOptInfo *joinrel,
+ Path *outer_path,
+ Path *inner_path,
+ SpecialJoinInfo *sjinfo,
+ Relids required_outer,
+ List **restrict_clauses);
extern ParamPathInfo *get_appendrel_parampathinfo(RelOptInfo *appendrel,
- Relids required_outer);
+ Relids required_outer);
extern ParamPathInfo *find_param_path_info(RelOptInfo *rel,
- Relids required_outer);
+ Relids required_outer);
extern RelOptInfo *build_child_join_rel(PlannerInfo *root,
- RelOptInfo *outer_rel, RelOptInfo *inner_rel,
- RelOptInfo *parent_joinrel, List *restrictlist,
- SpecialJoinInfo *sjinfo, JoinType jointype);
+ RelOptInfo *outer_rel, RelOptInfo *inner_rel,
+ RelOptInfo *parent_joinrel, List *restrictlist,
+ SpecialJoinInfo *sjinfo, JoinType jointype);
#endif /* PATHNODE_H */
diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h
index 0e858097c8..7345137d1d 100644
--- a/src/include/optimizer/paths.h
+++ b/src/include/optimizer/paths.h
@@ -50,16 +50,16 @@ extern PGDLLIMPORT join_search_hook_type join_search_hook;
extern RelOptInfo *make_one_rel(PlannerInfo *root, List *joinlist);
extern RelOptInfo *standard_join_search(PlannerInfo *root, int levels_needed,
- List *initial_rels);
+ List *initial_rels);
extern void generate_gather_paths(PlannerInfo *root, RelOptInfo *rel,
- bool override_rows);
-extern int compute_parallel_worker(RelOptInfo *rel, double heap_pages,
- double index_pages, int max_workers);
+ bool override_rows);
+extern int compute_parallel_worker(RelOptInfo *rel, double heap_pages,
+ double index_pages, int max_workers);
extern void create_partial_bitmap_paths(PlannerInfo *root, RelOptInfo *rel,
- Path *bitmapqual);
+ Path *bitmapqual);
extern void generate_partitionwise_join_paths(PlannerInfo *root,
- RelOptInfo *rel);
+ RelOptInfo *rel);
#ifdef OPTIMIZER_DEBUG
extern void debug_print_rel(PlannerInfo *root, RelOptInfo *rel);
@@ -71,12 +71,12 @@ extern void debug_print_rel(PlannerInfo *root, RelOptInfo *rel);
*/
extern void create_index_paths(PlannerInfo *root, RelOptInfo *rel);
extern bool relation_has_unique_index_for(PlannerInfo *root, RelOptInfo *rel,
- List *restrictlist,
- List *exprlist, List *oprlist);
+ List *restrictlist,
+ List *exprlist, List *oprlist);
extern bool indexcol_is_bool_constant_for_query(IndexOptInfo *index,
- int indexcol);
+ int indexcol);
extern bool match_index_to_operand(Node *operand, int indexcol,
- IndexOptInfo *index);
+ IndexOptInfo *index);
extern void check_index_predicates(PlannerInfo *root, RelOptInfo *rel);
/*
@@ -90,9 +90,9 @@ extern void create_tidscan_paths(PlannerInfo *root, RelOptInfo *rel);
* routines to create join paths
*/
extern void add_paths_to_joinrel(PlannerInfo *root, RelOptInfo *joinrel,
- RelOptInfo *outerrel, RelOptInfo *innerrel,
- JoinType jointype, SpecialJoinInfo *sjinfo,
- List *restrictlist);
+ RelOptInfo *outerrel, RelOptInfo *innerrel,
+ JoinType jointype, SpecialJoinInfo *sjinfo,
+ List *restrictlist);
/*
* joinrels.c
@@ -100,15 +100,15 @@ extern void add_paths_to_joinrel(PlannerInfo *root, RelOptInfo *joinrel,
*/
extern void join_search_one_level(PlannerInfo *root, int level);
extern RelOptInfo *make_join_rel(PlannerInfo *root,
- RelOptInfo *rel1, RelOptInfo *rel2);
+ RelOptInfo *rel1, RelOptInfo *rel2);
extern bool have_join_order_restriction(PlannerInfo *root,
- RelOptInfo *rel1, RelOptInfo *rel2);
+ RelOptInfo *rel1, RelOptInfo *rel2);
extern bool have_dangerous_phv(PlannerInfo *root,
- Relids outer_relids, Relids inner_params);
+ Relids outer_relids, Relids inner_params);
extern void mark_dummy_rel(RelOptInfo *rel);
extern bool have_partkey_equi_join(RelOptInfo *joinrel,
- RelOptInfo *rel1, RelOptInfo *rel2,
- JoinType jointype, List *restrictlist);
+ RelOptInfo *rel1, RelOptInfo *rel2,
+ JoinType jointype, List *restrictlist);
/*
* equivclass.c
@@ -121,53 +121,53 @@ typedef bool (*ec_matches_callback_type) (PlannerInfo *root,
void *arg);
extern bool process_equivalence(PlannerInfo *root,
- RestrictInfo **p_restrictinfo,
- bool below_outer_join);
+ RestrictInfo **p_restrictinfo,
+ bool below_outer_join);
extern Expr *canonicalize_ec_expression(Expr *expr,
- Oid req_type, Oid req_collation);
+ Oid req_type, Oid req_collation);
extern void reconsider_outer_join_clauses(PlannerInfo *root);
extern EquivalenceClass *get_eclass_for_sort_expr(PlannerInfo *root,
- Expr *expr,
- Relids nullable_relids,
- List *opfamilies,
- Oid opcintype,
- Oid collation,
- Index sortref,
- Relids rel,
- bool create_it);
+ Expr *expr,
+ Relids nullable_relids,
+ List *opfamilies,
+ Oid opcintype,
+ Oid collation,
+ Index sortref,
+ Relids rel,
+ bool create_it);
extern void generate_base_implied_equalities(PlannerInfo *root);
extern List *generate_join_implied_equalities(PlannerInfo *root,
- Relids join_relids,
- Relids outer_relids,
- RelOptInfo *inner_rel);
+ Relids join_relids,
+ Relids outer_relids,
+ RelOptInfo *inner_rel);
extern List *generate_join_implied_equalities_for_ecs(PlannerInfo *root,
- List *eclasses,
- Relids join_relids,
- Relids outer_relids,
- RelOptInfo *inner_rel);
+ List *eclasses,
+ Relids join_relids,
+ Relids outer_relids,
+ RelOptInfo *inner_rel);
extern bool exprs_known_equal(PlannerInfo *root, Node *item1, Node *item2);
extern EquivalenceClass *match_eclasses_to_foreign_key_col(PlannerInfo *root,
- ForeignKeyOptInfo *fkinfo,
- int colno);
+ ForeignKeyOptInfo *fkinfo,
+ int colno);
extern void add_child_rel_equivalences(PlannerInfo *root,
- AppendRelInfo *appinfo,
- RelOptInfo *parent_rel,
- RelOptInfo *child_rel);
+ AppendRelInfo *appinfo,
+ RelOptInfo *parent_rel,
+ RelOptInfo *child_rel);
extern List *generate_implied_equalities_for_column(PlannerInfo *root,
- RelOptInfo *rel,
- ec_matches_callback_type callback,
- void *callback_arg,
- Relids prohibited_rels);
+ RelOptInfo *rel,
+ ec_matches_callback_type callback,
+ void *callback_arg,
+ Relids prohibited_rels);
extern bool have_relevant_eclass_joinclause(PlannerInfo *root,
- RelOptInfo *rel1, RelOptInfo *rel2);
+ RelOptInfo *rel1, RelOptInfo *rel2);
extern bool has_relevant_eclass_joinclause(PlannerInfo *root,
- RelOptInfo *rel1);
+ RelOptInfo *rel1);
extern bool eclass_useful_for_merging(PlannerInfo *root,
- EquivalenceClass *eclass,
- RelOptInfo *rel);
+ EquivalenceClass *eclass,
+ RelOptInfo *rel);
extern bool is_redundant_derived_clause(RestrictInfo *rinfo, List *clauselist);
extern bool is_redundant_with_indexclauses(RestrictInfo *rinfo,
- List *indexclauses);
+ List *indexclauses);
/*
* pathkeys.c
@@ -184,55 +184,55 @@ typedef enum
extern PathKeysComparison compare_pathkeys(List *keys1, List *keys2);
extern bool pathkeys_contained_in(List *keys1, List *keys2);
extern Path *get_cheapest_path_for_pathkeys(List *paths, List *pathkeys,
- Relids required_outer,
- CostSelector cost_criterion,
- bool require_parallel_safe);
+ Relids required_outer,
+ CostSelector cost_criterion,
+ bool require_parallel_safe);
extern Path *get_cheapest_fractional_path_for_pathkeys(List *paths,
- List *pathkeys,
- Relids required_outer,
- double fraction);
+ List *pathkeys,
+ Relids required_outer,
+ double fraction);
extern Path *get_cheapest_parallel_safe_total_inner(List *paths);
extern List *build_index_pathkeys(PlannerInfo *root, IndexOptInfo *index,
- ScanDirection scandir);
+ ScanDirection scandir);
extern List *build_partition_pathkeys(PlannerInfo *root, RelOptInfo *partrel,
- ScanDirection scandir, bool *partialkeys);
+ ScanDirection scandir, bool *partialkeys);
extern List *build_expression_pathkey(PlannerInfo *root, Expr *expr,
- Relids nullable_relids, Oid opno,
- Relids rel, bool create_it);
+ Relids nullable_relids, Oid opno,
+ Relids rel, bool create_it);
extern List *convert_subquery_pathkeys(PlannerInfo *root, RelOptInfo *rel,
- List *subquery_pathkeys,
- List *subquery_tlist);
+ List *subquery_pathkeys,
+ List *subquery_tlist);
extern List *build_join_pathkeys(PlannerInfo *root,
- RelOptInfo *joinrel,
- JoinType jointype,
- List *outer_pathkeys);
+ RelOptInfo *joinrel,
+ JoinType jointype,
+ List *outer_pathkeys);
extern List *make_pathkeys_for_sortclauses(PlannerInfo *root,
- List *sortclauses,
- List *tlist);
+ List *sortclauses,
+ List *tlist);
extern void initialize_mergeclause_eclasses(PlannerInfo *root,
- RestrictInfo *restrictinfo);
+ RestrictInfo *restrictinfo);
extern void update_mergeclause_eclasses(PlannerInfo *root,
- RestrictInfo *restrictinfo);
+ RestrictInfo *restrictinfo);
extern List *find_mergeclauses_for_outer_pathkeys(PlannerInfo *root,
- List *pathkeys,
- List *restrictinfos);
+ List *pathkeys,
+ List *restrictinfos);
extern List *select_outer_pathkeys_for_merge(PlannerInfo *root,
- List *mergeclauses,
- RelOptInfo *joinrel);
+ List *mergeclauses,
+ RelOptInfo *joinrel);
extern List *make_inner_pathkeys_for_merge(PlannerInfo *root,
- List *mergeclauses,
- List *outer_pathkeys);
+ List *mergeclauses,
+ List *outer_pathkeys);
extern List *trim_mergeclauses_for_inner_pathkeys(PlannerInfo *root,
- List *mergeclauses,
- List *pathkeys);
+ List *mergeclauses,
+ List *pathkeys);
extern List *truncate_useless_pathkeys(PlannerInfo *root,
- RelOptInfo *rel,
- List *pathkeys);
+ RelOptInfo *rel,
+ List *pathkeys);
extern bool has_useful_pathkeys(PlannerInfo *root, RelOptInfo *rel);
extern PathKey *make_canonical_pathkey(PlannerInfo *root,
- EquivalenceClass *eclass, Oid opfamily,
- int strategy, bool nulls_first);
+ EquivalenceClass *eclass, Oid opfamily,
+ int strategy, bool nulls_first);
extern void add_paths_to_append_rel(PlannerInfo *root, RelOptInfo *rel,
- List *live_childrels);
+ List *live_childrels);
#endif /* PATHS_H */
diff --git a/src/include/optimizer/placeholder.h b/src/include/optimizer/placeholder.h
index 86a1e5d039..be27751974 100644
--- a/src/include/optimizer/placeholder.h
+++ b/src/include/optimizer/placeholder.h
@@ -18,17 +18,17 @@
extern PlaceHolderVar *make_placeholder_expr(PlannerInfo *root, Expr *expr,
- Relids phrels);
+ Relids phrels);
extern PlaceHolderInfo *find_placeholder_info(PlannerInfo *root,
- PlaceHolderVar *phv, bool create_new_ph);
+ PlaceHolderVar *phv, bool create_new_ph);
extern void find_placeholders_in_jointree(PlannerInfo *root);
extern void update_placeholder_eval_levels(PlannerInfo *root,
- SpecialJoinInfo *new_sjinfo);
+ SpecialJoinInfo *new_sjinfo);
extern void fix_placeholder_input_needed_levels(PlannerInfo *root);
extern void add_placeholders_to_base_rels(PlannerInfo *root);
extern void add_placeholders_to_joinrel(PlannerInfo *root, RelOptInfo *joinrel,
- RelOptInfo *outer_rel, RelOptInfo *inner_rel);
+ RelOptInfo *outer_rel, RelOptInfo *inner_rel);
extern void add_placeholders_to_child_joinrel(PlannerInfo *root,
- RelOptInfo *childrel, RelOptInfo *parentrel);
+ RelOptInfo *childrel, RelOptInfo *parentrel);
#endif /* PLACEHOLDER_H */
diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h
index 3254613e6e..bbb27f8779 100644
--- a/src/include/optimizer/plancat.h
+++ b/src/include/optimizer/plancat.h
@@ -26,47 +26,47 @@ extern PGDLLIMPORT get_relation_info_hook_type get_relation_info_hook;
extern void get_relation_info(PlannerInfo *root, Oid relationObjectId,
- bool inhparent, RelOptInfo *rel);
+ bool inhparent, RelOptInfo *rel);
extern List *infer_arbiter_indexes(PlannerInfo *root);
extern void estimate_rel_size(Relation rel, int32 *attr_widths,
- BlockNumber *pages, double *tuples, double *allvisfrac);
+ BlockNumber *pages, double *tuples, double *allvisfrac);
extern int32 get_rel_data_width(Relation rel, int32 *attr_widths);
extern int32 get_relation_data_width(Oid relid, int32 *attr_widths);
extern bool relation_excluded_by_constraints(PlannerInfo *root,
- RelOptInfo *rel, RangeTblEntry *rte);
+ RelOptInfo *rel, RangeTblEntry *rte);
extern List *build_physical_tlist(PlannerInfo *root, RelOptInfo *rel);
extern bool has_unique_index(RelOptInfo *rel, AttrNumber attno);
extern Selectivity restriction_selectivity(PlannerInfo *root,
- Oid operatorid,
- List *args,
- Oid inputcollid,
- int varRelid);
+ Oid operatorid,
+ List *args,
+ Oid inputcollid,
+ int varRelid);
extern Selectivity join_selectivity(PlannerInfo *root,
- Oid operatorid,
- List *args,
- Oid inputcollid,
- JoinType jointype,
- SpecialJoinInfo *sjinfo);
+ Oid operatorid,
+ List *args,
+ Oid inputcollid,
+ JoinType jointype,
+ SpecialJoinInfo *sjinfo);
extern Selectivity function_selectivity(PlannerInfo *root,
- Oid funcid,
- List *args,
- Oid inputcollid,
- bool is_join,
- int varRelid,
- JoinType jointype,
- SpecialJoinInfo *sjinfo);
+ Oid funcid,
+ List *args,
+ Oid inputcollid,
+ bool is_join,
+ int varRelid,
+ JoinType jointype,
+ SpecialJoinInfo *sjinfo);
extern void add_function_cost(PlannerInfo *root, Oid funcid, Node *node,
- QualCost *cost);
+ QualCost *cost);
extern double get_function_rows(PlannerInfo *root, Oid funcid, Node *node);
diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h
index 6d10bf3ee8..e7aaddd50d 100644
--- a/src/include/optimizer/planmain.h
+++ b/src/include/optimizer/planmain.h
@@ -28,7 +28,7 @@ typedef void (*query_pathkeys_callback) (PlannerInfo *root, void *extra);
* prototypes for plan/planmain.c
*/
extern RelOptInfo *query_planner(PlannerInfo *root,
- query_pathkeys_callback qp_callback, void *qp_extra);
+ query_pathkeys_callback qp_callback, void *qp_extra);
/*
* prototypes for plan/planagg.c
@@ -40,11 +40,11 @@ extern void preprocess_minmax_aggregates(PlannerInfo *root);
*/
extern Plan *create_plan(PlannerInfo *root, Path *best_path);
extern ForeignScan *make_foreignscan(List *qptlist, List *qpqual,
- Index scanrelid, List *fdw_exprs, List *fdw_private,
- List *fdw_scan_tlist, List *fdw_recheck_quals,
- Plan *outer_plan);
+ Index scanrelid, List *fdw_exprs, List *fdw_private,
+ List *fdw_scan_tlist, List *fdw_recheck_quals,
+ Plan *outer_plan);
extern Plan *change_plan_targetlist(Plan *subplan, List *tlist,
- bool tlist_parallel_safe);
+ bool tlist_parallel_safe);
extern Plan *materialize_finished_plan(Plan *subplan);
extern bool is_projection_capable_path(Path *path);
extern bool is_projection_capable_plan(Plan *plan);
@@ -52,10 +52,10 @@ extern bool is_projection_capable_plan(Plan *plan);
/* External use of these functions is deprecated: */
extern Sort *make_sort_from_sortclauses(List *sortcls, Plan *lefttree);
extern Agg *make_agg(List *tlist, List *qual,
- AggStrategy aggstrategy, AggSplit aggsplit,
- int numGroupCols, AttrNumber *grpColIdx, Oid *grpOperators, Oid *grpCollations,
- List *groupingSets, List *chain,
- double dNumGroups, Plan *lefttree);
+ AggStrategy aggstrategy, AggSplit aggsplit,
+ int numGroupCols, AttrNumber *grpColIdx, Oid *grpOperators, Oid *grpCollations,
+ List *groupingSets, List *chain,
+ double dNumGroups, Plan *lefttree);
extern Limit *make_limit(Plan *lefttree, Node *limitOffset, Node *limitCount);
/*
@@ -68,29 +68,29 @@ extern void add_base_rels_to_query(PlannerInfo *root, Node *jtnode);
extern void add_other_rels_to_query(PlannerInfo *root);
extern void build_base_rel_tlists(PlannerInfo *root, List *final_tlist);
extern void add_vars_to_targetlist(PlannerInfo *root, List *vars,
- Relids where_needed, bool create_new_ph);
+ Relids where_needed, bool create_new_ph);
extern void find_lateral_references(PlannerInfo *root);
extern void create_lateral_join_info(PlannerInfo *root);
extern List *deconstruct_jointree(PlannerInfo *root);
extern void distribute_restrictinfo_to_rels(PlannerInfo *root,
- RestrictInfo *restrictinfo);
+ RestrictInfo *restrictinfo);
extern void process_implied_equality(PlannerInfo *root,
- Oid opno,
- Oid collation,
- Expr *item1,
- Expr *item2,
- Relids qualscope,
- Relids nullable_relids,
- Index security_level,
- bool below_outer_join,
- bool both_const);
+ Oid opno,
+ Oid collation,
+ Expr *item1,
+ Expr *item2,
+ Relids qualscope,
+ Relids nullable_relids,
+ Index security_level,
+ bool below_outer_join,
+ bool both_const);
extern RestrictInfo *build_implied_join_equality(Oid opno,
- Oid collation,
- Expr *item1,
- Expr *item2,
- Relids qualscope,
- Relids nullable_relids,
- Index security_level);
+ Oid collation,
+ Expr *item1,
+ Expr *item2,
+ Relids qualscope,
+ Relids nullable_relids,
+ Index security_level);
extern void match_foreign_keys_to_quals(PlannerInfo *root);
/*
@@ -101,8 +101,8 @@ extern void reduce_unique_semijoins(PlannerInfo *root);
extern bool query_supports_distinctness(Query *query);
extern bool query_is_distinct_for(Query *query, List *colnos, List *opids);
extern bool innerrel_is_unique(PlannerInfo *root,
- Relids joinrelids, Relids outerrelids, RelOptInfo *innerrel,
- JoinType jointype, List *restrictlist, bool force_cache);
+ Relids joinrelids, Relids outerrelids, RelOptInfo *innerrel,
+ JoinType jointype, List *restrictlist, bool force_cache);
/*
* prototypes for plan/setrefs.c
diff --git a/src/include/optimizer/planner.h b/src/include/optimizer/planner.h
index 830557e4c2..8d30b94215 100644
--- a/src/include/optimizer/planner.h
+++ b/src/include/optimizer/planner.h
@@ -38,21 +38,21 @@ extern PGDLLIMPORT create_upper_paths_hook_type create_upper_paths_hook;
extern PlannedStmt *standard_planner(Query *parse, int cursorOptions,
- ParamListInfo boundParams);
+ ParamListInfo boundParams);
extern PlannerInfo *subquery_planner(PlannerGlobal *glob, Query *parse,
- PlannerInfo *parent_root,
- bool hasRecursion, double tuple_fraction);
+ PlannerInfo *parent_root,
+ bool hasRecursion, double tuple_fraction);
extern RowMarkType select_rowmark_type(RangeTblEntry *rte,
- LockClauseStrength strength);
+ LockClauseStrength strength);
extern bool limit_needed(Query *parse);
extern void mark_partial_aggref(Aggref *agg, AggSplit aggsplit);
extern Path *get_cheapest_fractional_path(RelOptInfo *rel,
- double tuple_fraction);
+ double tuple_fraction);
extern Expr *preprocess_phv_expression(PlannerInfo *root, Expr *expr);
diff --git a/src/include/optimizer/restrictinfo.h b/src/include/optimizer/restrictinfo.h
index c34876014a..0fe92ad428 100644
--- a/src/include/optimizer/restrictinfo.h
+++ b/src/include/optimizer/restrictinfo.h
@@ -22,27 +22,27 @@
make_restrictinfo(clause, true, false, false, 0, NULL, NULL, NULL)
extern RestrictInfo *make_restrictinfo(Expr *clause,
- bool is_pushed_down,
- bool outerjoin_delayed,
- bool pseudoconstant,
- Index security_level,
- Relids required_relids,
- Relids outer_relids,
- Relids nullable_relids);
+ bool is_pushed_down,
+ bool outerjoin_delayed,
+ bool pseudoconstant,
+ Index security_level,
+ Relids required_relids,
+ Relids outer_relids,
+ Relids nullable_relids);
extern RestrictInfo *commute_restrictinfo(RestrictInfo *rinfo, Oid comm_op);
extern bool restriction_is_or_clause(RestrictInfo *restrictinfo);
extern bool restriction_is_securely_promotable(RestrictInfo *restrictinfo,
- RelOptInfo *rel);
+ RelOptInfo *rel);
extern List *get_actual_clauses(List *restrictinfo_list);
extern List *extract_actual_clauses(List *restrictinfo_list,
- bool pseudoconstant);
+ bool pseudoconstant);
extern void extract_actual_join_clauses(List *restrictinfo_list,
- Relids joinrelids,
- List **joinquals,
- List **otherquals);
+ Relids joinrelids,
+ List **joinquals,
+ List **otherquals);
extern bool join_clause_is_movable_to(RestrictInfo *rinfo, RelOptInfo *baserel);
extern bool join_clause_is_movable_into(RestrictInfo *rinfo,
- Relids currentrelids,
- Relids current_and_outer);
+ Relids currentrelids,
+ Relids current_and_outer);
#endif /* RESTRICTINFO_H */
diff --git a/src/include/optimizer/subselect.h b/src/include/optimizer/subselect.h
index 2d2c3bcbc0..71a22eeb64 100644
--- a/src/include/optimizer/subselect.h
+++ b/src/include/optimizer/subselect.h
@@ -18,12 +18,12 @@
extern void SS_process_ctes(PlannerInfo *root);
extern JoinExpr *convert_ANY_sublink_to_join(PlannerInfo *root,
- SubLink *sublink,
- Relids available_rels);
+ SubLink *sublink,
+ Relids available_rels);
extern JoinExpr *convert_EXISTS_sublink_to_join(PlannerInfo *root,
- SubLink *sublink,
- bool under_not,
- Relids available_rels);
+ SubLink *sublink,
+ bool under_not,
+ Relids available_rels);
extern Node *SS_replace_correlation_vars(PlannerInfo *root, Node *expr);
extern Node *SS_process_sublinks(PlannerInfo *root, Node *expr, bool isQual);
extern void SS_identify_outer_params(PlannerInfo *root);
@@ -31,10 +31,10 @@ extern void SS_charge_for_initplans(PlannerInfo *root, RelOptInfo *final_rel);
extern void SS_attach_initplans(PlannerInfo *root, Plan *plan);
extern void SS_finalize_plan(PlannerInfo *root, Plan *plan);
extern Param *SS_make_initplan_output_param(PlannerInfo *root,
- Oid resulttype, int32 resulttypmod,
- Oid resultcollation);
+ Oid resulttype, int32 resulttypmod,
+ Oid resultcollation);
extern void SS_make_initplan_from_plan(PlannerInfo *root,
- PlannerInfo *subroot, Plan *plan,
- Param *prm);
+ PlannerInfo *subroot, Plan *plan,
+ Param *prm);
#endif /* SUBSELECT_H */
diff --git a/src/include/optimizer/tlist.h b/src/include/optimizer/tlist.h
index 46d614f4fb..8a2378f968 100644
--- a/src/include/optimizer/tlist.h
+++ b/src/include/optimizer/tlist.h
@@ -42,13 +42,13 @@ extern List *make_tlist_from_pathtarget(PathTarget *target);
extern PathTarget *copy_pathtarget(PathTarget *src);
extern PathTarget *create_empty_pathtarget(void);
extern void add_column_to_pathtarget(PathTarget *target,
- Expr *expr, Index sortgroupref);
+ Expr *expr, Index sortgroupref);
extern void add_new_column_to_pathtarget(PathTarget *target, Expr *expr);
extern void add_new_columns_to_pathtarget(PathTarget *target, List *exprs);
extern void apply_pathtarget_labeling_to_tlist(List *tlist, PathTarget *target);
extern void split_pathtarget_at_srfs(PlannerInfo *root,
- PathTarget *target, PathTarget *input_target,
- List **targets, List **targets_contain_srfs);
+ PathTarget *target, PathTarget *input_target,
+ List **targets, List **targets_contain_srfs);
/* Convenience macro to get a PathTarget with valid cost/width fields */
#define create_pathtarget(root, tlist) \