pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Report the true database name on connection errors 6+ messages / 1 participants [nested] [flat]
* pgsql: Report the true database name on connection errors @ 2021-01-26 19:43 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2021-01-26 19:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bcae842b962a485524a41575810caf231400e3db Modified Files -------------- contrib/oid2name/oid2name.c | 2 +- contrib/vacuumlo/vacuumlo.c | 2 +- src/bin/pg_dump/pg_dumpall.c | 2 +- src/bin/pgbench/pgbench.c | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Report the true database name on connection errors @ 2021-01-26 19:43 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2021-01-26 19:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/11a708f8159fa9752ecc78a157b62d54cd0b7a2f Modified Files -------------- contrib/oid2name/oid2name.c | 2 +- contrib/vacuumlo/vacuumlo.c | 2 +- src/bin/pg_dump/pg_dumpall.c | 2 +- src/bin/pgbench/pgbench.c | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Report the true database name on connection errors @ 2021-01-26 19:43 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2021-01-26 19:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fdf9d005401dc2aa0b6321794310cd3cdb634b2d Modified Files -------------- contrib/oid2name/oid2name.c | 2 +- contrib/vacuumlo/vacuumlo.c | 2 +- src/bin/pg_dump/pg_dumpall.c | 2 +- src/bin/pgbench/pgbench.c | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Report the true database name on connection errors @ 2021-01-26 19:43 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2021-01-26 19:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fdd405c63fff4e3d0215f1d41b1ef58361dc81dc Modified Files -------------- contrib/oid2name/oid2name.c | 2 +- contrib/vacuumlo/vacuumlo.c | 2 +- src/bin/pg_dump/pg_dumpall.c | 2 +- src/bin/pgbench/pgbench.c | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Report the true database name on connection errors @ 2021-01-26 19:43 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2021-01-26 19:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f17e8f33f781ce156ee73e8e7b6d104fcfa9c811 Modified Files -------------- contrib/oid2name/oid2name.c | 4 ++-- contrib/vacuumlo/vacuumlo.c | 2 +- src/bin/pg_dump/pg_dumpall.c | 2 +- src/bin/pgbench/pgbench.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Report the true database name on connection errors @ 2021-01-26 19:43 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2021-01-26 19:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f2dc962360b329c811c5e08eb0de4fb82462cdaf Modified Files -------------- contrib/oid2name/oid2name.c | 2 +- contrib/vacuumlo/vacuumlo.c | 2 +- src/bin/pg_dump/pg_dumpall.c | 2 +- src/bin/pgbench/pgbench.c | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2021-01-26 19:43 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-01-26 19:43 pgsql: Report the true database name on connection errors Alvaro Herrera <alvherre@alvh.no-ip.org> 2021-01-26 19:43 pgsql: Report the true database name on connection errors Alvaro Herrera <alvherre@alvh.no-ip.org> 2021-01-26 19:43 pgsql: Report the true database name on connection errors Alvaro Herrera <alvherre@alvh.no-ip.org> 2021-01-26 19:43 pgsql: Report the true database name on connection errors Alvaro Herrera <alvherre@alvh.no-ip.org> 2021-01-26 19:43 pgsql: Report the true database name on connection errors Alvaro Herrera <alvherre@alvh.no-ip.org> 2021-01-26 19:43 pgsql: Report the true database name on connection errors Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox