summaryrefslogtreecommitdiff
path: root/src/include/optimizer
diff options
context:
space:
mode:
authorTom Lane2017-06-21 19:18:54 +0000
committerTom Lane2017-06-21 19:19:25 +0000
commitc7b8998ebbf310a156aa38022555a24d98fdbfb4 (patch)
treee85979fb1213a731b7b557f8a830df541f26b135 /src/include/optimizer
parentf669c09989bda894d6ba01634ccb229f0687c08a (diff)
Phase 2 of pgindent updates.
Change pg_bsd_indent to follow upstream rules for placement of comments to the right of code, and remove pgindent hack that caused comments following #endif to not obey the general rule. Commit e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 wasn't actually using the published version of pg_bsd_indent, but a hacked-up version that tried to minimize the amount of movement of comments to the right of code. The situation of interest is where such a comment has to be moved to the right of its default placement at column 33 because there's code there. BSD indent has always moved right in units of tab stops in such cases --- but in the previous incarnation, indent was working in 8-space tab stops, while now it knows we use 4-space tabs. So the net result is that in about half the cases, such comments are placed one tab stop left of before. This is better all around: it leaves more room on the line for comment text, and it means that in such cases the comment uniformly starts at the next 4-space tab stop after the code, rather than sometimes one and sometimes two tabs after. Also, ensure that comments following #endif are indented the same as comments following other preprocessor commands such as #else. That inconsistency turns out to have been self-inflicted damage from a poorly-thought-through post-indent "fixup" in pgindent. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src/include/optimizer')
-rw-r--r--src/include/optimizer/clauses.h2
-rw-r--r--src/include/optimizer/cost.h4
-rw-r--r--src/include/optimizer/geqo.h4
-rw-r--r--src/include/optimizer/geqo_copy.h2
-rw-r--r--src/include/optimizer/geqo_gene.h2
-rw-r--r--src/include/optimizer/geqo_misc.h4
-rw-r--r--src/include/optimizer/geqo_mutation.h2
-rw-r--r--src/include/optimizer/geqo_pool.h2
-rw-r--r--src/include/optimizer/geqo_random.h2
-rw-r--r--src/include/optimizer/geqo_recombination.h2
-rw-r--r--src/include/optimizer/geqo_selection.h2
-rw-r--r--src/include/optimizer/joininfo.h2
-rw-r--r--src/include/optimizer/orclauses.h2
-rw-r--r--src/include/optimizer/pathnode.h2
-rw-r--r--src/include/optimizer/paths.h2
-rw-r--r--src/include/optimizer/placeholder.h2
-rw-r--r--src/include/optimizer/plancat.h2
-rw-r--r--src/include/optimizer/planmain.h2
-rw-r--r--src/include/optimizer/planner.h2
-rw-r--r--src/include/optimizer/predtest.h2
-rw-r--r--src/include/optimizer/prep.h2
-rw-r--r--src/include/optimizer/restrictinfo.h2
-rw-r--r--src/include/optimizer/subselect.h2
-rw-r--r--src/include/optimizer/tlist.h2
-rw-r--r--src/include/optimizer/var.h10
25 files changed, 32 insertions, 32 deletions
diff --git a/src/include/optimizer/clauses.h b/src/include/optimizer/clauses.h
index cc0d7b0a268..e3672218f38 100644
--- a/src/include/optimizer/clauses.h
+++ b/src/include/optimizer/clauses.h
@@ -85,4 +85,4 @@ extern Node *estimate_expression_value(PlannerInfo *root, Node *node);
extern Query *inline_set_returning_function(PlannerInfo *root,
RangeTblEntry *rte);
-#endif /* CLAUSES_H */
+#endif /* CLAUSES_H */
diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h
index a8cedb8f78a..8c0cccb054b 100644
--- a/src/include/optimizer/cost.h
+++ b/src/include/optimizer/cost.h
@@ -35,7 +35,7 @@ typedef enum
{
CONSTRAINT_EXCLUSION_OFF, /* do not use c_e */
CONSTRAINT_EXCLUSION_ON, /* apply c_e to all rels */
- CONSTRAINT_EXCLUSION_PARTITION /* apply c_e to otherrels only */
+ CONSTRAINT_EXCLUSION_PARTITION /* apply c_e to otherrels only */
} ConstraintExclusionType;
@@ -210,4 +210,4 @@ extern void cost_gather_merge(GatherMergePath *path, PlannerInfo *root,
Cost input_startup_cost, Cost input_total_cost,
double *rows);
-#endif /* COST_H */
+#endif /* COST_H */
diff --git a/src/include/optimizer/geqo.h b/src/include/optimizer/geqo.h
index be65c054e10..d0158d7adfb 100644
--- a/src/include/optimizer/geqo.h
+++ b/src/include/optimizer/geqo.h
@@ -73,7 +73,7 @@ extern double Geqo_seed; /* 0 .. 1 */
typedef struct
{
List *initial_rels; /* the base relations we are joining */
- unsigned short random_state[3]; /* state for pg_erand48() */
+ unsigned short random_state[3]; /* state for pg_erand48() */
} GeqoPrivateData;
@@ -85,4 +85,4 @@ extern RelOptInfo *geqo(PlannerInfo *root,
extern Cost geqo_eval(PlannerInfo *root, Gene *tour, int num_gene);
extern RelOptInfo *gimme_tree(PlannerInfo *root, Gene *tour, int num_gene);
-#endif /* GEQO_H */
+#endif /* GEQO_H */
diff --git a/src/include/optimizer/geqo_copy.h b/src/include/optimizer/geqo_copy.h
index 3cbaf3e4cad..4035b4ff130 100644
--- a/src/include/optimizer/geqo_copy.h
+++ b/src/include/optimizer/geqo_copy.h
@@ -27,4 +27,4 @@
extern void geqo_copy(PlannerInfo *root, Chromosome *chromo1, Chromosome *chromo2, int string_length);
-#endif /* GEQO_COPY_H */
+#endif /* GEQO_COPY_H */
diff --git a/src/include/optimizer/geqo_gene.h b/src/include/optimizer/geqo_gene.h
index f936ebdd89f..32821932840 100644
--- a/src/include/optimizer/geqo_gene.h
+++ b/src/include/optimizer/geqo_gene.h
@@ -42,4 +42,4 @@ typedef struct Pool
int string_length;
} Pool;
-#endif /* GEQO_GENE_H */
+#endif /* GEQO_GENE_H */
diff --git a/src/include/optimizer/geqo_misc.h b/src/include/optimizer/geqo_misc.h
index 880bd0e140c..89f91b3a4df 100644
--- a/src/include/optimizer/geqo_misc.h
+++ b/src/include/optimizer/geqo_misc.h
@@ -29,6 +29,6 @@
extern void print_pool(FILE *fp, Pool *pool, int start, int stop);
extern void print_gen(FILE *fp, Pool *pool, int generation);
extern void print_edge_table(FILE *fp, Edge *edge_table, int num_gene);
-#endif /* GEQO_DEBUG */
+#endif /* GEQO_DEBUG */
-#endif /* GEQO_MISC_H */
+#endif /* GEQO_MISC_H */
diff --git a/src/include/optimizer/geqo_mutation.h b/src/include/optimizer/geqo_mutation.h
index 85781c3c317..c5a94e03cfd 100644
--- a/src/include/optimizer/geqo_mutation.h
+++ b/src/include/optimizer/geqo_mutation.h
@@ -27,4 +27,4 @@
extern void geqo_mutation(PlannerInfo *root, Gene *tour, int num_gene);
-#endif /* GEQO_MUTATION_H */
+#endif /* GEQO_MUTATION_H */
diff --git a/src/include/optimizer/geqo_pool.h b/src/include/optimizer/geqo_pool.h
index 7947b6e5bb3..9fac307d691 100644
--- a/src/include/optimizer/geqo_pool.h
+++ b/src/include/optimizer/geqo_pool.h
@@ -37,4 +37,4 @@ extern void spread_chromo(PlannerInfo *root, Chromosome *chromo, Pool *pool);
extern void sort_pool(PlannerInfo *root, Pool *pool);
-#endif /* GEQO_POOL_H */
+#endif /* GEQO_POOL_H */
diff --git a/src/include/optimizer/geqo_random.h b/src/include/optimizer/geqo_random.h
index 53125893878..2665a096b34 100644
--- a/src/include/optimizer/geqo_random.h
+++ b/src/include/optimizer/geqo_random.h
@@ -38,4 +38,4 @@ extern double geqo_rand(PlannerInfo *root);
#define geqo_randint(root, upper, lower) \
( (int) floor( geqo_rand(root)*(((upper)-(lower))+0.999999) ) + (lower) )
-#endif /* GEQO_RANDOM_H */
+#endif /* GEQO_RANDOM_H */
diff --git a/src/include/optimizer/geqo_recombination.h b/src/include/optimizer/geqo_recombination.h
index 8ddde222960..8a436b9ec2b 100644
--- a/src/include/optimizer/geqo_recombination.h
+++ b/src/include/optimizer/geqo_recombination.h
@@ -86,4 +86,4 @@ extern void ox1(PlannerInfo *root, Gene *mom, Gene *dad, Gene *offspring,
extern void ox2(PlannerInfo *root, Gene *mom, Gene *dad, Gene *offspring,
int num_gene, City *city_table);
-#endif /* GEQO_RECOMBINATION_H */
+#endif /* GEQO_RECOMBINATION_H */
diff --git a/src/include/optimizer/geqo_selection.h b/src/include/optimizer/geqo_selection.h
index 1aecf14ac13..69ce2b4b8a0 100644
--- a/src/include/optimizer/geqo_selection.h
+++ b/src/include/optimizer/geqo_selection.h
@@ -30,4 +30,4 @@ extern void geqo_selection(PlannerInfo *root,
Chromosome *momma, Chromosome *daddy,
Pool *pool, double bias);
-#endif /* GEQO_SELECTION_H */
+#endif /* GEQO_SELECTION_H */
diff --git a/src/include/optimizer/joininfo.h b/src/include/optimizer/joininfo.h
index c9a8b53f1fd..4450d81408c 100644
--- a/src/include/optimizer/joininfo.h
+++ b/src/include/optimizer/joininfo.h
@@ -27,4 +27,4 @@ extern void remove_join_clause_from_rels(PlannerInfo *root,
RestrictInfo *restrictinfo,
Relids join_relids);
-#endif /* JOININFO_H */
+#endif /* JOININFO_H */
diff --git a/src/include/optimizer/orclauses.h b/src/include/optimizer/orclauses.h
index 2512ddee8f2..a3d8e1d9f90 100644
--- a/src/include/optimizer/orclauses.h
+++ b/src/include/optimizer/orclauses.h
@@ -18,4 +18,4 @@
extern void extract_restriction_or_clauses(PlannerInfo *root);
-#endif /* ORCLAUSES_H */
+#endif /* ORCLAUSES_H */
diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h
index 245825c38b9..0c0549db7f7 100644
--- a/src/include/optimizer/pathnode.h
+++ b/src/include/optimizer/pathnode.h
@@ -286,4 +286,4 @@ extern ParamPathInfo *get_joinrel_parampathinfo(PlannerInfo *root,
extern ParamPathInfo *get_appendrel_parampathinfo(RelOptInfo *appendrel,
Relids required_outer);
-#endif /* PATHNODE_H */
+#endif /* PATHNODE_H */
diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h
index 807729c74a3..4e06b2e2993 100644
--- a/src/include/optimizer/paths.h
+++ b/src/include/optimizer/paths.h
@@ -228,4 +228,4 @@ extern PathKey *make_canonical_pathkey(PlannerInfo *root,
EquivalenceClass *eclass, Oid opfamily,
int strategy, bool nulls_first);
-#endif /* PATHS_H */
+#endif /* PATHS_H */
diff --git a/src/include/optimizer/placeholder.h b/src/include/optimizer/placeholder.h
index 11e6403aa30..5a4d46ba9d7 100644
--- a/src/include/optimizer/placeholder.h
+++ b/src/include/optimizer/placeholder.h
@@ -29,4 +29,4 @@ 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);
-#endif /* PLACEHOLDER_H */
+#endif /* PLACEHOLDER_H */
diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h
index 16960c28590..71f0faf9384 100644
--- a/src/include/optimizer/plancat.h
+++ b/src/include/optimizer/plancat.h
@@ -57,4 +57,4 @@ extern Selectivity join_selectivity(PlannerInfo *root,
extern bool has_row_triggers(PlannerInfo *root, Index rti, CmdType event);
-#endif /* PLANCAT_H */
+#endif /* PLANCAT_H */
diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h
index e3cde2595b3..f1d16cffab0 100644
--- a/src/include/optimizer/planmain.h
+++ b/src/include/optimizer/planmain.h
@@ -120,4 +120,4 @@ extern void extract_query_dependencies(Node *query,
List **invalItems,
bool *hasRowSecurity);
-#endif /* PLANMAIN_H */
+#endif /* PLANMAIN_H */
diff --git a/src/include/optimizer/planner.h b/src/include/optimizer/planner.h
index 41667f2c413..2a4cf71e102 100644
--- a/src/include/optimizer/planner.h
+++ b/src/include/optimizer/planner.h
@@ -59,4 +59,4 @@ extern bool plan_cluster_use_sort(Oid tableOid, Oid indexOid);
extern List *get_partitioned_child_rels(PlannerInfo *root, Index rti);
-#endif /* PLANNER_H */
+#endif /* PLANNER_H */
diff --git a/src/include/optimizer/predtest.h b/src/include/optimizer/predtest.h
index 748cd356112..bccb8d63a95 100644
--- a/src/include/optimizer/predtest.h
+++ b/src/include/optimizer/predtest.h
@@ -22,4 +22,4 @@ extern bool predicate_implied_by(List *predicate_list, List *clause_list,
extern bool predicate_refuted_by(List *predicate_list, List *clause_list,
bool clause_is_check);
-#endif /* PREDTEST_H */
+#endif /* PREDTEST_H */
diff --git a/src/include/optimizer/prep.h b/src/include/optimizer/prep.h
index 2b20b36f74f..faad46b5e4e 100644
--- a/src/include/optimizer/prep.h
+++ b/src/include/optimizer/prep.h
@@ -58,4 +58,4 @@ extern Node *adjust_appendrel_attrs(PlannerInfo *root, Node *node,
extern Node *adjust_appendrel_attrs_multilevel(PlannerInfo *root, Node *node,
RelOptInfo *child_rel);
-#endif /* PREP_H */
+#endif /* PREP_H */
diff --git a/src/include/optimizer/restrictinfo.h b/src/include/optimizer/restrictinfo.h
index 31b9a792859..b2a69998fd8 100644
--- a/src/include/optimizer/restrictinfo.h
+++ b/src/include/optimizer/restrictinfo.h
@@ -43,4 +43,4 @@ extern bool join_clause_is_movable_into(RestrictInfo *rinfo,
Relids currentrelids,
Relids current_and_outer);
-#endif /* RESTRICTINFO_H */
+#endif /* RESTRICTINFO_H */
diff --git a/src/include/optimizer/subselect.h b/src/include/optimizer/subselect.h
index 56dc237b513..ecd2011d54d 100644
--- a/src/include/optimizer/subselect.h
+++ b/src/include/optimizer/subselect.h
@@ -40,4 +40,4 @@ extern Param *assign_nestloop_param_placeholdervar(PlannerInfo *root,
PlaceHolderVar *phv);
extern int SS_assign_special_param(PlannerInfo *root);
-#endif /* SUBSELECT_H */
+#endif /* SUBSELECT_H */
diff --git a/src/include/optimizer/tlist.h b/src/include/optimizer/tlist.h
index ccb93d8c802..0d3ec920dd8 100644
--- a/src/include/optimizer/tlist.h
+++ b/src/include/optimizer/tlist.h
@@ -69,4 +69,4 @@ extern void split_pathtarget_at_srfs(PlannerInfo *root,
#define create_pathtarget(root, tlist) \
set_pathtarget_cost_width(root, make_pathtarget_from_tlist(tlist))
-#endif /* TLIST_H */
+#endif /* TLIST_H */
diff --git a/src/include/optimizer/var.h b/src/include/optimizer/var.h
index ae1f856933c..61861528af2 100644
--- a/src/include/optimizer/var.h
+++ b/src/include/optimizer/var.h
@@ -21,10 +21,10 @@
#define PVC_RECURSE_AGGREGATES 0x0002 /* recurse into Aggref arguments */
#define PVC_INCLUDE_WINDOWFUNCS 0x0004 /* include WindowFuncs in output list */
#define PVC_RECURSE_WINDOWFUNCS 0x0008 /* recurse into WindowFunc arguments */
-#define PVC_INCLUDE_PLACEHOLDERS 0x0010 /* include PlaceHolderVars in
- * output list */
-#define PVC_RECURSE_PLACEHOLDERS 0x0020 /* recurse into PlaceHolderVar
- * arguments */
+#define PVC_INCLUDE_PLACEHOLDERS 0x0010 /* include PlaceHolderVars in
+ * output list */
+#define PVC_RECURSE_PLACEHOLDERS 0x0020 /* recurse into PlaceHolderVar
+ * arguments */
extern Relids pull_varnos(Node *node);
@@ -37,4 +37,4 @@ extern int locate_var_of_level(Node *node, int levelsup);
extern List *pull_var_clause(Node *node, int flags);
extern Node *flatten_join_alias_vars(PlannerInfo *root, Node *node);
-#endif /* VAR_H */
+#endif /* VAR_H */