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/tablefunc/tablefunc.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/E1dAmxK-0006EE-1r@gemulon.postgresql.org
Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'contrib/tablefunc/tablefunc.c')
-rw-r--r-- | contrib/tablefunc/tablefunc.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c index b5e1ad29e2e..0bc8177b61b 100644 --- a/contrib/tablefunc/tablefunc.c +++ b/contrib/tablefunc/tablefunc.c @@ -684,7 +684,7 @@ crosstab_hash(PG_FUNCTION_ARGS) crosstab_hash, tupdesc, per_query_ctx, - rsinfo->allowedModes & SFRM_Materialize_Random); + rsinfo->allowedModes & SFRM_Materialize_Random); /* * SFRM_Materialize mode expects us to return a NULL Datum. The actual @@ -1046,7 +1046,7 @@ connectby_text(PG_FUNCTION_ARGS) show_branch, show_serial, per_query_ctx, - rsinfo->allowedModes & SFRM_Materialize_Random, + rsinfo->allowedModes & SFRM_Materialize_Random, attinmeta); rsinfo->setDesc = tupdesc; @@ -1126,7 +1126,7 @@ connectby_text_serial(PG_FUNCTION_ARGS) show_branch, show_serial, per_query_ctx, - rsinfo->allowedModes & SFRM_Materialize_Random, + rsinfo->allowedModes & SFRM_Materialize_Random, attinmeta); rsinfo->setDesc = tupdesc; @@ -1475,17 +1475,17 @@ validateConnectbyTupleDesc(TupleDesc tupdesc, bool show_branch, bool show_serial if (show_branch && show_serial && tupdesc->attrs[4]->atttypid != INT4OID) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("query-specified return tuple not valid for Connectby: " - "fifth column must be type %s", - format_type_be(INT4OID)))); + errmsg("query-specified return tuple not valid for Connectby: " + "fifth column must be type %s", + format_type_be(INT4OID)))); /* check that the type of the fifth column is INT4 */ if (!show_branch && show_serial && tupdesc->attrs[3]->atttypid != INT4OID) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("query-specified return tuple not valid for Connectby: " - "fourth column must be type %s", - format_type_be(INT4OID)))); + errmsg("query-specified return tuple not valid for Connectby: " + "fourth column must be type %s", + format_type_be(INT4OID)))); /* OK, the tupdesc is valid for our purposes */ } @@ -1525,8 +1525,8 @@ compatConnectbyTupleDescs(TupleDesc ret_tupdesc, TupleDesc sql_tupdesc) errmsg("invalid return type"), errdetail("SQL key field type %s does " \ "not match return key field type %s.", - format_type_with_typemod(ret_atttypid, ret_atttypmod), - format_type_with_typemod(sql_atttypid, sql_atttypmod)))); + format_type_with_typemod(ret_atttypid, ret_atttypmod), + format_type_with_typemod(sql_atttypid, sql_atttypmod)))); ret_atttypid = ret_tupdesc->attrs[1]->atttypid; sql_atttypid = sql_tupdesc->attrs[1]->atttypid; @@ -1539,8 +1539,8 @@ compatConnectbyTupleDescs(TupleDesc ret_tupdesc, TupleDesc sql_tupdesc) errmsg("invalid return type"), errdetail("SQL parent key field type %s does " \ "not match return parent key field type %s.", - format_type_with_typemod(ret_atttypid, ret_atttypmod), - format_type_with_typemod(sql_atttypid, sql_atttypmod)))); + format_type_with_typemod(ret_atttypid, ret_atttypmod), + format_type_with_typemod(sql_atttypid, sql_atttypmod)))); /* OK, the two tupdescs are compatible for our purposes */ } |