Re: Using the %m printf format more

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: pgsql-hackers@postgresql.org
Date: 2024-03-12T01:22:18Z
Lists: pgsql-hackers
On Mon, Mar 11, 2024 at 11:19:16AM +0000, Dagfinn Ilmari Mannsåker wrote:
> On closer look, fprintf() is actually the only errno-clobbering function
> it calls, I was just hedging my bets in that statement.

This makes the whole simpler, so I'd be OK with that.  I am wondering
if others have opinions to offer about that.

I've applied v2-0001 for now, as it is worth on its own and it shaves
a bit of code.
--
Michael

Commits

  1. pg_regress: Save errno in emit_tap_output_v() and switch to %m

  2. Use printf's %m format instead of strerror(errno) in more places

  3. Add --copy-file-range option to pg_upgrade.