aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-09-13 16:53:11 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-09-13 16:53:11 -0400
commit896a0c44f93b0b449fdf7e6c3973deab5fdfed4f (patch)
tree07e9be0563ca40f9ad92b81f490120fb952ba9fa /src/backend/tcop/postgres.c
parent4ffd3fe4d6ccc9ff36271e5a21ea3b065621b982 (diff)
downloadpostgresql-896a0c44f93b0b449fdf7e6c3973deab5fdfed4f.tar.gz
postgresql-896a0c44f93b0b449fdf7e6c3973deab5fdfed4f.zip
Clear conn->errorMessage at successful completion of PQconnectdb().
Commits ffa2e4670 and 52a10224e 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.us
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions