postgresql/src/bin
Tom Lane d6c55de1f9 Implement %m in src/port/snprintf.c, and teach elog.c to rely on that.
I started out with the idea that we needed to detect use of %m format specs
in contexts other than elog/ereport calls, because we couldn't rely on that
working in *printf calls.  But a better answer is to fix things so that it
does work.  Now that we're using snprintf.c all the time, we can implement
%m in that and we've fixed the problem.

This requires also adjusting our various printf-wrapping functions so that
they ensure "errno" is preserved when they call snprintf.c.

Remove elog.c's handmade implementation of %m, and let it rely on
snprintf to support the feature.  That should provide some performance
gain, though I've not attempted to measure it.

There are a lot of places where we could now simplify 'printf("%s",
strerror(errno))' into 'printf("%m")', but I'm not in any big hurry
to make that happen.

Patch by me, reviewed by Michael Paquier

Discussion: https://postgr.es/m/2975.1526862605@sss.pgh.pa.us
2018-09-26 13:31:56 -04:00
..
initdb Sync our Snowball stemmer dictionaries with current upstream. 2018-09-24 17:29:38 -04:00
pg_archivecleanup Don't fall off the end of perl functions 2018-05-27 09:08:42 -04:00
pg_basebackup Allow concurrent-safe open() and fopen() in frontend code for Windows 2018-09-14 10:04:14 +09:00
pg_config Translation updates 2018-05-21 12:29:52 -04:00
pg_controldata Translation updates 2018-06-25 12:37:18 +02:00
pg_ctl Implement "pg_ctl logrotate" command 2018-09-01 19:46:49 +03:00
pg_dump Implement %m in src/port/snprintf.c, and teach elog.c to rely on that. 2018-09-26 13:31:56 -04:00
pg_resetwal Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:17 -04:00
pg_rewind Message style improvements 2018-09-13 23:35:43 +02:00
pg_test_fsync Translation updates 2018-05-21 12:29:52 -04:00
pg_test_timing Translation updates 2018-05-21 12:29:52 -04:00
pg_upgrade Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:17 -04:00
pg_verify_checksums Allow concurrent-safe open() and fopen() in frontend code for Windows 2018-09-14 10:04:14 +09:00
pg_waldump Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:17 -04:00
pgbench Avoid unnecessary precision loss for pgbench's --rate target. 2018-09-25 11:09:18 -04:00
pgevent Update copyright for 2018 2018-01-02 23:30:12 -05:00
psql Get rid of explicit argument-count markings in tab-complete.c. 2018-09-21 20:50:41 -04:00
scripts Add semicolons to end of internally run queries 2018-08-30 19:23:22 +02:00
Makefile Allow on-line enabling and disabling of data checksums 2018-04-05 22:04:48 +02:00