1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Avoid splitting C string literals with \-newline

Using \ is unnecessary and ugly, so remove that.  While at it, stitch
the literals back into a single line: we've long discouraged splitting
error message literals even when they go past the 80 chars line limit,
to improve greppability.

Leave contrib/tablefunc alone.

Discussion: https://postgr.es/m/20191223195156.GA12271@alvherre.pgsql
This commit is contained in:
Alvaro Herrera
2019-12-24 12:37:13 -03:00
parent cce64a51ca
commit c4dcd9144b
15 changed files with 26 additions and 51 deletions

View File

@ -1639,8 +1639,7 @@ dblink_build_sql_insert(PG_FUNCTION_ARGS)
if (src_nitems != pknumatts)
ereport(ERROR,
(errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
errmsg("source key array length must match number of key " \
"attributes")));
errmsg("source key array length must match number of key attributes")));
/*
* Target array is made up of key values that will be used to build the
@ -1654,8 +1653,7 @@ dblink_build_sql_insert(PG_FUNCTION_ARGS)
if (tgt_nitems != pknumatts)
ereport(ERROR,
(errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
errmsg("target key array length must match number of key " \
"attributes")));
errmsg("target key array length must match number of key attributes")));
/*
* Prep work is finally done. Go get the SQL string.
@ -1727,8 +1725,7 @@ dblink_build_sql_delete(PG_FUNCTION_ARGS)
if (tgt_nitems != pknumatts)
ereport(ERROR,
(errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
errmsg("target key array length must match number of key " \
"attributes")));
errmsg("target key array length must match number of key attributes")));
/*
* Prep work is finally done. Go get the SQL string.
@ -1807,8 +1804,7 @@ dblink_build_sql_update(PG_FUNCTION_ARGS)
if (src_nitems != pknumatts)
ereport(ERROR,
(errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
errmsg("source key array length must match number of key " \
"attributes")));
errmsg("source key array length must match number of key attributes")));
/*
* Target array is made up of key values that will be used to build the
@ -1822,8 +1818,7 @@ dblink_build_sql_update(PG_FUNCTION_ARGS)
if (tgt_nitems != pknumatts)
ereport(ERROR,
(errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
errmsg("target key array length must match number of key " \
"attributes")));
errmsg("target key array length must match number of key attributes")));
/*
* Prep work is finally done. Go get the SQL string.