pgsql: Make src/common/exec.c's error logging less ugly.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Make src/common/exec.c's error logging less ugly.
Дата
Msg-id E1g9vw0-0003EV-Uh@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Make src/common/exec.c's error logging less ugly.

This code used elog where it really ought to use ereport, mainly so that
it can report a SQLSTATE different from ERRCODE_INTERNAL_ERROR.  There
were some other random deviations from typical error report practice too.

In addition, we can make some cleanups that were impractical six months
ago:

* Use one variadic macro, instead of several with different numbers
of arguments, reducing the temptation to force-fit messages into
particular numbers of arguments;

* Use %m, even in the frontend case, simplifying the code.

Discussion: https://postgr.es/m/6025.1527351693@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b6b297d20df9f738be20a450f80bade535819220

Modified Files
--------------
src/common/exec.c | 124 +++++++++++++++++++++++++++++++-----------------------
1 file changed, 72 insertions(+), 52 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: pgsql: Add "B" suffix for bytes to docs
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Turn transaction_isolation into GUC enum