Commit 138531f
committed
Clear conn->errorMessage at successful completion of PQconnectdb().
Commits ffa2e46 and 52a1022 caused libpq's connection-establishment
functions to usually leave a nonempty string in the connection's
errorMessage buffer, even after a successful connection. While that
was intentional on my part, more sober reflection says that it wasn't
a great idea: the string would be a bit confusing. Also this broke at
least one application that checked for connection success by examining
the errorMessage, instead of using PQstatus() as documented. Let's
clear the buffer at success exit, restoring the pre-v14 behavior.
Discussion: https://postgr.es/m/4170264.1620321747@sss.pgh.pa.us1 parent 1882d6c commit 138531f
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3654 | 3654 | | |
3655 | 3655 | | |
3656 | 3656 | | |
| 3657 | + | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
3657 | 3664 | | |
3658 | 3665 | | |
3659 | 3666 | | |
| |||
0 commit comments