postgresql/src/bin
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
..
initdb initdb: complete getopt_long alphabetization 2020-12-12 12:59:09 -05:00
pg_archivecleanup Translation updates 2020-11-09 12:36:44 +01:00
pg_basebackup Translation updates 2020-11-09 12:36:44 +01:00
pg_checksums pg_checksums: data_checksum_version is unsigned so use %u not %d 2020-12-01 20:27:05 -05:00
pg_config Translation updates 2020-11-09 12:36:44 +01:00
pg_controldata Translation updates 2020-11-09 12:36:44 +01:00
pg_ctl Avoid time-of-day-dependent failure in log rotation test. 2020-12-24 21:37:46 -05:00
pg_dump Report the true database name on connection errors 2021-01-26 16:42:13 -03:00
pg_resetwal Translation updates 2020-11-09 12:36:44 +01:00
pg_rewind Fix more race conditions in the newly-added pg_rewind test. 2020-12-07 14:55:22 +02:00
pg_test_fsync Translation updates 2020-08-10 15:21:18 +02:00
pg_test_timing Translation updates 2020-08-10 15:21:18 +02:00
pg_upgrade In pg_upgrade cross-version test, handle lack of oldstyle_length(). 2020-12-30 01:43:46 -08:00
pg_waldump Translation updates 2020-11-09 12:36:44 +01:00
pgbench Report the true database name on connection errors 2021-01-26 16:42:13 -03:00
pgevent Update copyright for 2019 2019-01-02 12:44:25 -05:00
psql Code review for psql's helpSQL() function. 2021-01-26 13:04:52 -05:00
scripts Adjust createdb TAP tests to work on recent OpenBSD. 2021-01-07 20:36:09 -05:00
Makefile Rename pg_verify_checksums to pg_checksums 2019-03-13 10:43:20 +09:00