mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Initial pgindent run with pg_bsd_indent version 2.0.
The new indent version includes numerous fixes thanks to Piotr Stefaniak. The main changes visible in this commit are: * Nicer formatting of function-pointer declarations. * No longer unexpectedly removes spaces in expressions using casts, sizeof, or offsetof. * No longer wants to add a space in "struct structname *varname", as well as some similar cases for const- or volatile-qualified pointers. * Declarations using PG_USED_FOR_ASSERTS_ONLY are formatted more nicely. * Fixes bug where comments following declarations were sometimes placed with no space separating them from the code. * Fixes some odd decisions for comments following case labels. * Fixes some cases where comments following code were indented to less than the expected column 33. On the less good side, it now tends to put more whitespace around typedef names that are not listed in typedefs.list. This might encourage us to put more effort into typedef name collection; it's not really a bug in indent itself. There are more changes coming after this round, having to do with comment indentation and alignment of lines appearing within parentheses. I wanted to limit the size of the diffs to something that could be reviewed without one's eyes completely glazing over, so it seemed better to split up the changes as much as practical. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
This commit is contained in:
@@ -36,7 +36,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 */
|
||||
} ConstraintExclusionType;
|
||||
} ConstraintExclusionType;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,24 +27,24 @@ extern int min_parallel_index_scan_size;
|
||||
|
||||
/* Hook for plugins to get control in set_rel_pathlist() */
|
||||
typedef void (*set_rel_pathlist_hook_type) (PlannerInfo *root,
|
||||
RelOptInfo *rel,
|
||||
Index rti,
|
||||
RangeTblEntry *rte);
|
||||
RelOptInfo *rel,
|
||||
Index rti,
|
||||
RangeTblEntry *rte);
|
||||
extern PGDLLIMPORT set_rel_pathlist_hook_type set_rel_pathlist_hook;
|
||||
|
||||
/* Hook for plugins to get control in add_paths_to_joinrel() */
|
||||
typedef void (*set_join_pathlist_hook_type) (PlannerInfo *root,
|
||||
RelOptInfo *joinrel,
|
||||
RelOptInfo *outerrel,
|
||||
RelOptInfo *innerrel,
|
||||
JoinType jointype,
|
||||
JoinPathExtraData *extra);
|
||||
RelOptInfo *joinrel,
|
||||
RelOptInfo *outerrel,
|
||||
RelOptInfo *innerrel,
|
||||
JoinType jointype,
|
||||
JoinPathExtraData *extra);
|
||||
extern PGDLLIMPORT set_join_pathlist_hook_type set_join_pathlist_hook;
|
||||
|
||||
/* Hook for plugins to replace standard_join_search() */
|
||||
typedef RelOptInfo *(*join_search_hook_type) (PlannerInfo *root,
|
||||
int levels_needed,
|
||||
List *initial_rels);
|
||||
int levels_needed,
|
||||
List *initial_rels);
|
||||
extern PGDLLIMPORT join_search_hook_type join_search_hook;
|
||||
|
||||
|
||||
@@ -117,10 +117,10 @@ extern bool have_dangerous_phv(PlannerInfo *root,
|
||||
* routines for managing EquivalenceClasses
|
||||
*/
|
||||
typedef bool (*ec_matches_callback_type) (PlannerInfo *root,
|
||||
RelOptInfo *rel,
|
||||
EquivalenceClass *ec,
|
||||
EquivalenceMember *em,
|
||||
void *arg);
|
||||
RelOptInfo *rel,
|
||||
EquivalenceClass *ec,
|
||||
EquivalenceMember *em,
|
||||
void *arg);
|
||||
|
||||
extern bool process_equivalence(PlannerInfo *root, RestrictInfo *restrictinfo,
|
||||
bool below_outer_join);
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
|
||||
/* Hook for plugins to get control in get_relation_info() */
|
||||
typedef void (*get_relation_info_hook_type) (PlannerInfo *root,
|
||||
Oid relationObjectId,
|
||||
bool inhparent,
|
||||
RelOptInfo *rel);
|
||||
Oid relationObjectId,
|
||||
bool inhparent,
|
||||
RelOptInfo *rel);
|
||||
extern PGDLLIMPORT get_relation_info_hook_type get_relation_info_hook;
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ typedef enum
|
||||
FORCE_PARALLEL_OFF,
|
||||
FORCE_PARALLEL_ON,
|
||||
FORCE_PARALLEL_REGRESS
|
||||
} ForceParallelMode;
|
||||
} ForceParallelMode;
|
||||
|
||||
/* GUC parameters */
|
||||
#define DEFAULT_CURSOR_TUPLE_FRACTION 0.1
|
||||
|
||||
@@ -20,15 +20,15 @@
|
||||
|
||||
/* Hook for plugins to get control in planner() */
|
||||
typedef PlannedStmt *(*planner_hook_type) (Query *parse,
|
||||
int cursorOptions,
|
||||
ParamListInfo boundParams);
|
||||
int cursorOptions,
|
||||
ParamListInfo boundParams);
|
||||
extern PGDLLIMPORT planner_hook_type planner_hook;
|
||||
|
||||
/* Hook for plugins to get control when grouping_planner() plans upper rels */
|
||||
typedef void (*create_upper_paths_hook_type) (PlannerInfo *root,
|
||||
UpperRelationKind stage,
|
||||
RelOptInfo *input_rel,
|
||||
RelOptInfo *output_rel);
|
||||
UpperRelationKind stage,
|
||||
RelOptInfo *input_rel,
|
||||
RelOptInfo *output_rel);
|
||||
extern PGDLLIMPORT create_upper_paths_hook_type create_upper_paths_hook;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user