aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execExprInterp.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-06-21 15:35:54 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-06-21 15:35:54 -0400
commit382ceffdf7f620d8f2d50e451b4167d291ae2348 (patch)
treef558251492f2c6f86e3566f7a82f9d00509122c2 /src/backend/executor/execExprInterp.c
parentc7b8998ebbf310a156aa38022555a24d98fdbfb4 (diff)
downloadpostgresql-382ceffdf7f620d8f2d50e451b4167d291ae2348.tar.gz
postgresql-382ceffdf7f620d8f2d50e451b4167d291ae2348.zip
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 'src/backend/executor/execExprInterp.c')
-rw-r--r--src/backend/executor/execExprInterp.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c
index 146d1a0bece..c227d9bdd99 100644
--- a/src/backend/executor/execExprInterp.c
+++ b/src/backend/executor/execExprInterp.c
@@ -1986,7 +1986,7 @@ ExecEvalCurrentOfExpr(ExprState *state, ExprEvalStep *op)
{
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("WHERE CURRENT OF is not supported for this table type")));
+ errmsg("WHERE CURRENT OF is not supported for this table type")));
}
/*
@@ -2187,7 +2187,7 @@ ExecEvalArrayExpr(ExprState *state, ExprEvalStep *op)
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("cannot merge incompatible arrays"),
errdetail("Array with element type %s cannot be "
- "included in ARRAY construct with element type %s.",
+ "included in ARRAY construct with element type %s.",
format_type_be(ARR_ELEMTYPE(array)),
format_type_be(element_type))));
@@ -2207,8 +2207,8 @@ ExecEvalArrayExpr(ExprState *state, ExprEvalStep *op)
if (ndims <= 0 || ndims > MAXDIM)
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("number of array dimensions (%d) exceeds " \
- "the maximum allowed (%d)", ndims, MAXDIM)));
+ errmsg("number of array dimensions (%d) exceeds " \
+ "the maximum allowed (%d)", ndims, MAXDIM)));
elem_dims = (int *) palloc(elem_ndims * sizeof(int));
memcpy(elem_dims, ARR_DIMS(array), elem_ndims * sizeof(int));
@@ -2601,7 +2601,7 @@ ExecEvalArrayRefSubscript(ExprState *state, ExprEvalStep *op)
if (arefstate->isassignment)
ereport(ERROR,
(errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
- errmsg("array subscript in assignment must not be null")));
+ errmsg("array subscript in assignment must not be null")));
*op->resnull = true;
return false;
}
@@ -2834,7 +2834,7 @@ ExecEvalConvertRowtype(ExprState *state, ExprEvalStep *op, ExprContext *econtext
/* prepare map from old to new attribute numbers */
op->d.convert_rowtype.map =
convert_tuples_by_name(indesc, outdesc,
- gettext_noop("could not convert row type"));
+ gettext_noop("could not convert row type"));
op->d.convert_rowtype.initialized = true;
MemoryContextSwitchTo(old_cxt);
@@ -3049,9 +3049,9 @@ ExecEvalConstraintCheck(ExprState *state, ExprEvalStep *op)
!DatumGetBool(*op->d.domaincheck.checkvalue))
ereport(ERROR,
(errcode(ERRCODE_CHECK_VIOLATION),
- errmsg("value for domain %s violates check constraint \"%s\"",
- format_type_be(op->d.domaincheck.resulttype),
- op->d.domaincheck.constraintname),
+ errmsg("value for domain %s violates check constraint \"%s\"",
+ format_type_be(op->d.domaincheck.resulttype),
+ op->d.domaincheck.constraintname),
errdomainconstraint(op->d.domaincheck.resulttype,
op->d.domaincheck.constraintname)));
}
@@ -3116,7 +3116,7 @@ ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op)
appendStringInfo(&buf, "<%s>%s</%s>",
argname,
map_sql_value_to_xml_value(value,
- exprType((Node *) e), true),
+ exprType((Node *) e), true),
argname);
*op->resnull = false;
}
@@ -3137,10 +3137,10 @@ ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op)
case IS_XMLELEMENT:
*op->resvalue = PointerGetDatum(xmlelement(xexpr,
- op->d.xmlexpr.named_argvalue,
- op->d.xmlexpr.named_argnull,
+ op->d.xmlexpr.named_argvalue,
+ op->d.xmlexpr.named_argnull,
op->d.xmlexpr.argvalue,
- op->d.xmlexpr.argnull));
+ op->d.xmlexpr.argnull));
*op->resnull = false;
break;
@@ -3166,7 +3166,7 @@ ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op)
*op->resvalue = PointerGetDatum(xmlparse(data,
xexpr->xmloption,
- preserve_whitespace));
+ preserve_whitespace));
*op->resnull = false;
}
break;
@@ -3243,8 +3243,8 @@ ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op)
value = argvalue[0];
*op->resvalue = PointerGetDatum(
- xmltotext_with_xmloption(DatumGetXmlP(value),
- xexpr->xmloption));
+ xmltotext_with_xmloption(DatumGetXmlP(value),
+ xexpr->xmloption));
*op->resnull = false;
}
break;
@@ -3418,7 +3418,7 @@ ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("table row type and query-specified row type do not match"),
errdetail_plural("Table row contains %d attribute, but query expects %d.",
- "Table row contains %d attributes, but query expects %d.",
+ "Table row contains %d attributes, but query expects %d.",
slot_tupdesc->natts,
slot_tupdesc->natts,
var_tupdesc->natts)));
@@ -3492,10 +3492,10 @@ ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
* perhaps other places.)
*/
if (econtext->ecxt_estate &&
- variable->varno <= list_length(econtext->ecxt_estate->es_range_table))
+ variable->varno <= list_length(econtext->ecxt_estate->es_range_table))
{
RangeTblEntry *rte = rt_fetch(variable->varno,
- econtext->ecxt_estate->es_range_table);
+ econtext->ecxt_estate->es_range_table);
if (rte->eref)
ExecTypeSetColNames(output_tupdesc, rte->eref->colnames);