Content-Length: 254413 | pFad | http://github.com/postgrespro/postgres/commit/8f7bd8e91da321cb38f09087a4b9411277917b13

A6 Reset error message at PQreset() · postgrespro/postgres@8f7bd8e · GitHub
Skip to content

Commit 8f7bd8e

Browse files
committed
Reset error message at PQreset()
If you call PQreset() repeatedly, and the connection cannot be re-established, the error messages from the failed connection attempts kept accumulating in the error string. Fixes bug #11455 reported by Caleb Epstein. Backpatch to all supported versions.
1 parent 4d1c738 commit 8f7bd8e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2894,6 +2894,7 @@ closePGconn(PGconn *conn)
28942894
* absent */
28952895
conn->asyncStatus = PGASYNC_IDLE;
28962896
pqClearAsyncResult(conn); /* deallocate result and curTuple */
2897+
resetPQExpBuffer(&conn->errorMessage);
28972898
pg_freeaddrinfo_all(conn->addrlist_family, conn->addrlist);
28982899
conn->addrlist = NULL;
28992900
conn->addr_cur = NULL;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/8f7bd8e91da321cb38f09087a4b9411277917b13

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy