| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Make src/common/exec.c's error logging less ugly. |
| Date: | 2018-10-09 17:36:40 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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/[email protected]
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b6b297d20df9f738be20a450f80bade535819220
Modified Files
--------------
src/common/exec.c | 124 +++++++++++++++++++++++++++++++-----------------------
1 file changed, 72 insertions(+), 52 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2018-10-09 19:32:59 | pgsql: Turn transaction_isolation into GUC enum |
| Previous Message | Greg Stark | 2018-10-09 15:55:10 | pgsql: Add "B" suffix for bytes to docs |