--- a/db_bridge/postgresql_db.cpp +++ b/db_bridge/postgresql_db.cpp @@ -42,6 +42,10 @@ return false; } + if (PQstatus(conn) != CONNECTION_OK) { + return false; + } + return true; }