Increase footprint of %m and reduce strerror()
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-11-29T06:51:15Z
Lists: pgsql-hackers
Hi all, Since commit d6c55de1, we support %m in the in-core port for printf and such. And it seems to me that we could do better for the frontend code by reducing the dependency to strerror(). One advantage of doing a switch, or at least reduce the use of strerror(), would be to ease the work of translators with more error messages unified between the frontend and the backend. A possible drawback is that this could be a cause of minor conflicts when back-patching. Always easy enough to fix, still that can be annoying. Thoughts? -- Michael
Commits
-
Replace use of strerror() with %s by %m in pg_waldump
- cce64a51cabc 13.0 landed
-
Implement %m in src/port/snprintf.c, and teach elog.c to rely on that.
- d6c55de1f99a 12.0 cited