diff options
author | Tom Lane | 2017-06-21 19:18:54 +0000 |
---|---|---|
committer | Tom Lane | 2017-06-21 19:19:25 +0000 |
commit | c7b8998ebbf310a156aa38022555a24d98fdbfb4 (patch) | |
tree | e85979fb1213a731b7b557f8a830df541f26b135 /src/backend/optimizer/plan/initsplan.c | |
parent | f669c09989bda894d6ba01634ccb229f0687c08a (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/[email protected]
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/optimizer/plan/initsplan.c')
-rw-r--r-- | src/backend/optimizer/plan/initsplan.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index ebd442ad4db..63cb055ef00 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -287,7 +287,7 @@ find_lateral_references(PlannerInfo *root) if (brel == NULL) continue; - Assert(brel->relid == rti); /* sanity check on array */ + Assert(brel->relid == rti); /* sanity check on array */ /* * This bit is less obvious than it might look. We ignore appendrel @@ -436,7 +436,7 @@ create_lateral_join_info(PlannerInfo *root) if (brel == NULL) continue; - Assert(brel->relid == rti); /* sanity check on array */ + Assert(brel->relid == rti); /* sanity check on array */ /* ignore RTEs that are "other rels" */ if (brel->reloptkind != RELOPT_BASEREL) @@ -945,7 +945,7 @@ deconstruct_recurse(PlannerInfo *root, Node *jtnode, bool below_outer_join, /* JOIN_RIGHT was eliminated during reduce_outer_joins() */ elog(ERROR, "unrecognized join type: %d", (int) j->jointype); - nonnullable_rels = NULL; /* keep compiler quiet */ + nonnullable_rels = NULL; /* keep compiler quiet */ nullable_rels = NULL; leftjoinlist = rightjoinlist = NIL; break; @@ -1214,7 +1214,7 @@ make_outerjoininfo(PlannerInfo *root, { sjinfo->min_lefthand = bms_copy(left_rels); sjinfo->min_righthand = bms_copy(right_rels); - sjinfo->lhs_strict = false; /* don't care about this */ + sjinfo->lhs_strict = false; /* don't care about this */ return sjinfo; } @@ -2047,7 +2047,7 @@ distribute_qual_to_rels(PlannerInfo *root, Node *clause, static bool check_outerjoin_delay(PlannerInfo *root, Relids *relids_p, /* in/out parameter */ - Relids *nullable_relids_p, /* output parameter */ + Relids *nullable_relids_p, /* output parameter */ bool is_pushed_down) { Relids relids; @@ -2304,8 +2304,8 @@ process_implied_equality(PlannerInfo *root, * original (this is necessary in case there are subselects in there...) */ clause = make_opclause(opno, - BOOLOID, /* opresulttype */ - false, /* opretset */ + BOOLOID, /* opresulttype */ + false, /* opretset */ copyObject(item1), copyObject(item2), InvalidOid, @@ -2367,8 +2367,8 @@ build_implied_join_equality(Oid opno, * original (this is necessary in case there are subselects in there...) */ clause = make_opclause(opno, - BOOLOID, /* opresulttype */ - false, /* opretset */ + BOOLOID, /* opresulttype */ + false, /* opretset */ copyObject(item1), copyObject(item2), InvalidOid, @@ -2378,12 +2378,12 @@ build_implied_join_equality(Oid opno, * Build the RestrictInfo node itself. */ restrictinfo = make_restrictinfo(clause, - true, /* is_pushed_down */ - false, /* outerjoin_delayed */ - false, /* pseudoconstant */ + true, /* is_pushed_down */ + false, /* outerjoin_delayed */ + false, /* pseudoconstant */ security_level, /* security_level */ qualscope, /* required_relids */ - NULL, /* outer_relids */ + NULL, /* outer_relids */ nullable_relids); /* nullable_relids */ /* Set mergejoinability/hashjoinability flags */ |