MCPcopy Create free account
hub / github.com/apache/cloudberry / PQfinish

Function PQfinish

src/interfaces/libpq/fe-connect.c:4395–4403  ·  view source on GitHub ↗

* PQfinish: properly close a connection to the backend. Also frees * the PGconn data structure so it shouldn't be re-used after this. */

Source from the content-addressed store, hash-verified

4393 * the PGconn data structure so it shouldn't be re-used after this.
4394 */
4395void
4396PQfinish(PGconn *conn)
4397{
4398 if (conn)
4399 {
4400 closePGconn(conn);
4401 freePGconn(conn);
4402 }
4403}
4404
4405/*
4406 * PQreset: resets the connection to the backend by closing the

Callers 15

connect_pg_serverFunction · 0.85
disconnect_pg_serverFunction · 0.85
vacuumloFunction · 0.85
dblink_get_connFunction · 0.85
dblink_connectFunction · 0.85
dblink_disconnectFunction · 0.85
dblink_record_internalFunction · 0.85
dblink_execFunction · 0.85
createNewConnectionFunction · 0.85
dblink_security_checkFunction · 0.85
sql_connFunction · 0.85
sql_execFunction · 0.85

Calls 2

closePGconnFunction · 0.85
freePGconnFunction · 0.85

Tested by 15

disconnect_atexitFunction · 0.68
mainFunction · 0.68
exit_nicelyFunction · 0.68
mainFunction · 0.68
exit_nicelyFunction · 0.68
mainFunction · 0.68
finish_conn_nicelyFunction · 0.68
finish_conn_nicelyFunction · 0.68
exit_nicelyFunction · 0.68
mainFunction · 0.68
exit_nicelyFunction · 0.68
mainFunction · 0.68