postgresql/contrib/vacuumlo
Alvaro Herrera fdf9d00540
Report the true database name on connection errors
When reporting connection errors, we might show a database name in the
message that's not the one we actually tried to connect to, if the
database was taken from libpq defaults instead of from user parameters.
Fix such error messages to use PQdb(), which reports the correct name.

(But, per commit 2930c05634, make sure not to try to print NULL.)

Apply to branches 9.5 through 13.  Branch master has already been
changed differently by commit 58cd8dca3d.

Reported-by: Robert Haas <robertmhaas@gmail.com>
Discussion: https://postgr.es/m/CA+TgmobssJ6rS22dspWnu-oDxXevGmhMD8VcRBjmj-b9UDqRjw@mail.gmail.com
2021-01-26 16:42:13 -03:00
..
t Rework option set of vacuumlo 2018-08-28 21:42:45 +09:00
.gitignore Rework option set of vacuumlo 2018-08-28 21:42:45 +09:00
Makefile Add PGXS options to control TAP and isolation tests, take two 2018-12-03 09:27:35 +09:00
vacuumlo.c Report the true database name on connection errors 2021-01-26 16:42:13 -03:00