2021-03-04 21:11, Michael Paquier wrote:
Like any other src/bin/ facilities, let's instead
remove all the getenv() calls at the beginning of pgbench.c and let's
libpq handle those environment variables if the parameters are NULL
(aka in the case of no values given directly in the options).  This
requires to move the debug log after doConnect(), which is no big deal
anyway as a failure results in an exit(1) immediately with a log
telling where the connection failed.

Thank you for improving my patch.
I agree that we should remove getenv() from pgbench.c and let libpq complement parameters with environment variables. As you said, it's not a big problem that the debug log output comes after doConnect(), I think.
Your patch is simpler and more ideal.

Regards.
--
Kota Miyake


Reply via email to