Make src/common/exec.c's error logging less ugly.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/common/exec.c | modified | +72 −52 |
Discussion
- Allowing printf("%m") only where it actually works 50 messages · 2018-05-21 → 2018-10-09