Re: Using the %m printf format more

2024-04-04 Thread Dagfinn Ilmari Mannsåker
On Thu, 4 Apr 2024, at 03:35, Michael Paquier wrote: > On Fri, Mar 22, 2024 at 01:58:24PM +, Dagfinn Ilmari Mannsåker wrote: >> Here's an updated patch that adds such a comment. I'll add it to the >> commitfest later today unless someone commits it before then. > > I see no problem to do that

Re: Using the %m printf format more

2024-04-03 Thread Michael Paquier
On Fri, Mar 22, 2024 at 01:58:24PM +, Dagfinn Ilmari Mannsåker wrote: > Here's an updated patch that adds such a comment. I'll add it to the > commitfest later today unless someone commits it before then. I see no problem to do that now rather than later. So, done to make pg_regress able to

Re: Using the %m printf format more

2024-03-22 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Michael Paquier writes: > >> On Wed, Mar 13, 2024 at 02:33:52PM +0100, Peter Eisentraut wrote: >>> The 0002 patch looks sensible. It would be good to fix that, otherwise it >>> could have some confusing outcomes in the future. >> >> You mean if we begin to use

Re: Using the %m printf format more

2024-03-14 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Wed, Mar 13, 2024 at 02:33:52PM +0100, Peter Eisentraut wrote: >> The 0002 patch looks sensible. It would be good to fix that, otherwise it >> could have some confusing outcomes in the future. > > You mean if we begin to use %m in future callers of > emit_tap_output_

Re: Using the %m printf format more

2024-03-14 Thread Michael Paquier
On Wed, Mar 13, 2024 at 02:33:52PM +0100, Peter Eisentraut wrote: > The 0002 patch looks sensible. It would be good to fix that, otherwise it > could have some confusing outcomes in the future. You mean if we begin to use %m in future callers of emit_tap_output_v(), hypothetically? That's a fair

Re: Using the %m printf format more

2024-03-13 Thread Peter Eisentraut
On 12.03.24 02:22, Michael Paquier wrote: On Mon, Mar 11, 2024 at 11:19:16AM +, 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 t

Re: Using the %m printf format more

2024-03-13 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Mon, Mar 11, 2024 at 11:19:16AM +, 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 a

Re: Using the %m printf format more

2024-03-11 Thread Michael Paquier
On Mon, Mar 11, 2024 at 11:19:16AM +, 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 opinio

Re: Using the %m printf format more

2024-03-11 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Wed, Mar 06, 2024 at 07:11:19PM +, Dagfinn Ilmari Mannsåker wrote: > >> The attached patch does so everywhere appropriate. One place where it's >> not appropriate is the TAP-emitting functions in pg_regress, since those >> call fprintf() > > I am not really follow

Re: Using the %m printf format more

2024-03-10 Thread Michael Paquier
On Wed, Mar 06, 2024 at 07:11:19PM +, Dagfinn Ilmari Mannsåker wrote: > I just noticed that commit d93627bc added a bunch of pg_fatal() calls > using %s and strerror(errno), which could be written more concisely as > %m. I'm assuming this was done because the surrounding code also uses > this

Using the %m printf format more

2024-03-06 Thread Dagfinn Ilmari Mannsåker
Hi hackers, I just noticed that commit d93627bc added a bunch of pg_fatal() calls using %s and strerror(errno), which could be written more concisely as %m. I'm assuming this was done because the surrounding code also uses this pattern, and hadn't been changed to use %m when support for that was