Re: Using the %m printf format more

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Michael Paquier <michael@paquier.xyz>, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: pgsql-hackers@postgresql.org
Date: 2024-03-13T13:33:52Z
Lists: pgsql-hackers
On 12.03.24 02:22, Michael Paquier wrote:
> 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.

The 0002 patch looks sensible.  It would be good to fix that, otherwise 
it could have some confusing outcomes in the future.




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.