- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitf2dc962
committed
Report the true database name on connection errors
When reporting connection errors, we might show a database name in themessage that's not the one we actually tried to connect to, if thedatabase was taken from libpq defaults instead of from user parameters.Fix such error messages to use PQdb(), which reports the correct name.(But, per commit2930c05, make sure not to try to print NULL.)Apply to branches 9.5 through 13. Branch master has already beenchanged differently by commit58cd8dc.Reported-by: Robert Haas <robertmhaas@gmail.com>Discussion:https://postgr.es/m/CA+TgmobssJ6rS22dspWnu-oDxXevGmhMD8VcRBjmj-b9UDqRjw@mail.gmail.com1 parent131825c commitf2dc962
File tree
4 files changed
+6
-5
lines changed- contrib
- oid2name
- vacuumlo
- src/bin
- pg_dump
- pgbench
4 files changed
+6
-5
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
319 | 319 |
| |
320 | 320 |
| |
321 | 321 |
| |
322 |
| - | |
| 322 | + | |
323 | 323 |
| |
324 | 324 |
| |
325 | 325 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
127 |
| - | |
| 127 | + | |
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1954 | 1954 |
| |
1955 | 1955 |
| |
1956 | 1956 |
| |
1957 |
| - | |
| 1957 | + | |
1958 | 1958 |
| |
1959 | 1959 |
| |
1960 | 1960 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
686 | 686 |
| |
687 | 687 |
| |
688 | 688 |
| |
689 |
| - | |
| 689 | + | |
690 | 690 |
| |
691 | 691 |
| |
692 | 692 |
| |
| |||
3312 | 3312 |
| |
3313 | 3313 |
| |
3314 | 3314 |
| |
3315 |
| - | |
| 3315 | + | |
| 3316 | + | |
3316 | 3317 |
| |
3317 | 3318 |
| |
3318 | 3319 |
| |
|
0 commit comments
Comments
(0)