aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2021-01-26 16:42:13 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2021-01-26 16:42:13 -0300
commitf17e8f33f781ce156ee73e8e7b6d104fcfa9c811 (patch)
tree5becb139bb3003c9fbc305da039064653812b3de /src/backend/commands/explain.c
parent64bdb6e5f8451a14e7349d3bbdb45dbac447eacc (diff)
downloadpostgresql-f17e8f33f781ce156ee73e8e7b6d104fcfa9c811.tar.gz
postgresql-f17e8f33f781ce156ee73e8e7b6d104fcfa9c811.zip
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 2930c05634bc, make sure not to try to print NULL.) Apply to branches 9.5 through 13. Branch master has already been changed differently by commit 58cd8dca3de0. Reported-by: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/CA+TgmobssJ6rS22dspWnu-oDxXevGmhMD8VcRBjmj-b9UDqRjw@mail.gmail.com
Diffstat (limited to 'src/backend/commands/explain.c')
0 files changed, 0 insertions, 0 deletions