diff options
author | Tom Lane | 2017-06-21 19:35:54 +0000 |
---|---|---|
committer | Tom Lane | 2017-06-21 19:35:54 +0000 |
commit | 382ceffdf7f620d8f2d50e451b4167d291ae2348 (patch) | |
tree | f558251492f2c6f86e3566f7a82f9d00509122c2 /contrib/postgres_fdw/deparse.c | |
parent | c7b8998ebbf310a156aa38022555a24d98fdbfb4 (diff) |
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they
flow past the right margin.
By default, BSD indent lines up statement continuation lines that are
within parentheses so that they start just to the right of the preceding
left parenthesis. However, traditionally, if that resulted in the
continuation line extending to the right of the desired right margin,
then indent would push it left just far enough to not overrun the margin,
if it could do so without making the continuation line start to the left of
the current statement indent. That makes for a weird mix of indentations
unless one has been completely rigid about never violating the 80-column
limit.
This behavior has been pretty universally panned by Postgres developers.
Hence, disable it with indent's new -lpl switch, so that parenthesized
lines are always lined up with the preceding left paren.
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 'contrib/postgres_fdw/deparse.c')
-rw-r--r-- | contrib/postgres_fdw/deparse.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c index 482a3dd3016..2af83640101 100644 --- a/contrib/postgres_fdw/deparse.c +++ b/contrib/postgres_fdw/deparse.c @@ -168,7 +168,7 @@ static void deparseLockingClause(deparse_expr_cxt *context); static void appendOrderByClause(List *pathkeys, deparse_expr_cxt *context); static void appendConditions(List *exprs, deparse_expr_cxt *context); static void deparseFromExprForRel(StringInfo buf, PlannerInfo *root, - RelOptInfo *joinrel, bool use_alias, List **params_list); + RelOptInfo *joinrel, bool use_alias, List **params_list); static void deparseFromExpr(List *quals, deparse_expr_cxt *context); static void deparseRangeTblRef(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, bool make_subquery, @@ -728,7 +728,7 @@ foreign_expr_walker(Node *node, agg->args); sortcoltype = exprType((Node *) tle->expr); typentry = lookup_type_cache(sortcoltype, - TYPECACHE_LT_OPR | TYPECACHE_GT_OPR); + TYPECACHE_LT_OPR | TYPECACHE_GT_OPR); /* Check shippability of non-default sort operator. */ if (srt->sortop != typentry->lt_opr && srt->sortop != typentry->gt_opr && @@ -883,8 +883,8 @@ build_tlist_to_deparse(RelOptInfo *foreignrel) * required for evaluating the local conditions. */ tlist = add_to_flat_tlist(tlist, - pull_var_clause((Node *) foreignrel->reltarget->exprs, - PVC_RECURSE_PLACEHOLDERS)); + pull_var_clause((Node *) foreignrel->reltarget->exprs, + PVC_RECURSE_PLACEHOLDERS)); foreach(lc, fpinfo->local_conds) { RestrictInfo *rinfo = lfirst_node(RestrictInfo, lc); @@ -1434,7 +1434,7 @@ deparseFromExprForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, * ((outer relation) <join type> (inner relation) ON (joinclauses)) */ appendStringInfo(buf, "(%s %s JOIN %s ON ", join_sql_o.data, - get_jointype_name(fpinfo->jointype), join_sql_i.data); + get_jointype_name(fpinfo->jointype), join_sql_i.data); /* Append join clause; (TRUE) if no join clause */ if (fpinfo->joinclauses) @@ -1596,7 +1596,7 @@ deparseInsertSql(StringInfo buf, PlannerInfo *root, appendStringInfoString(buf, " ON CONFLICT DO NOTHING"); deparseReturningList(buf, root, rtindex, rel, - rel->trigdesc && rel->trigdesc->trig_insert_after_row, + rel->trigdesc && rel->trigdesc->trig_insert_after_row, returningList, retrieved_attrs); } @@ -1638,7 +1638,7 @@ deparseUpdateSql(StringInfo buf, PlannerInfo *root, appendStringInfoString(buf, " WHERE ctid = $1"); deparseReturningList(buf, root, rtindex, rel, - rel->trigdesc && rel->trigdesc->trig_update_after_row, + rel->trigdesc && rel->trigdesc->trig_update_after_row, returningList, retrieved_attrs); } @@ -1728,7 +1728,7 @@ deparseDeleteSql(StringInfo buf, PlannerInfo *root, appendStringInfoString(buf, " WHERE ctid = $1"); deparseReturningList(buf, root, rtindex, rel, - rel->trigdesc && rel->trigdesc->trig_delete_after_row, + rel->trigdesc && rel->trigdesc->trig_delete_after_row, returningList, retrieved_attrs); } |