Re: [PATCH] Fix incorrect fprintf usage in log_error FRONTEND path

2025-10-18 Thread Tom Lane
Bryan Green writes: > The problem: > - FRONTEND path: fprintf(stderr, fmt, ap) - incorrect > - non-FRONTEND path: write_stderr(fmt, ap) - also incorrect > The first patch only addressed the fprintf issue. The v2 patch > addresses both. Actually, you'd managed to drop the fprintf->vfprintf chan

Re: [PATCH] Fix incorrect fprintf usage in log_error FRONTEND path

2025-10-18 Thread Bryan Green
On 10/13/25 13:24, Bryan Green wrote: On 10/13/25 13:16, Bryan Green wrote: On 10/13/25 13:01, Tom Lane wrote: Bryan Green writes: On 10/13/25 10:48, Tom Lane wrote: Huh, that certainly appears broken, but isn't the non-FRONTEND case equally broken?  write_stderr() doesn't expect a va_list e

Re: [PATCH] Fix incorrect fprintf usage in log_error FRONTEND path

2025-10-17 Thread Tom Lane
Bryan Green writes: > I noticed that the log_error() utility function has a bug in its FRONTEND > code path. The function uses fprintf() with a va_list argument, but > fprintf() expects individual arguments. This should > be vfprintf() instead. Huh, that certainly appears broken, but isn't the no

Re: [PATCH] Fix incorrect fprintf usage in log_error FRONTEND path

2025-10-13 Thread Bryan Green
On 10/13/25 13:16, Bryan Green wrote: On 10/13/25 13:01, Tom Lane wrote: Bryan Green writes: On 10/13/25 10:48, Tom Lane wrote: Huh, that certainly appears broken, but isn't the non-FRONTEND case equally broken?  write_stderr() doesn't expect a va_list either.  I wonder if this code is ever r

[PATCH] Fix incorrect fprintf usage in log_error FRONTEND path

2025-10-13 Thread Bryan Green
Hi, I noticed that the log_error() utility function has a bug in its FRONTEND code path. The function uses fprintf() with a va_list argument, but fprintf() expects individual arguments. This should be vfprintf() instead. The relevant code: #else fprintf(stderr, fmt, ap); #endif Should be: #