db_bridge/postgresql_db.cpp
changeset 125 9c0fdc119939
parent 65 76514757b0d6
equal deleted inserted replaced
124:8a983ee5fab7 125:9c0fdc119939
    40     if ((conn = PQconnectdb (conninfo.c_str ())) == NULL) {
    40     if ((conn = PQconnectdb (conninfo.c_str ())) == NULL) {
    41         std::cerr << server << ": " << "ERROR " << std::endl;
    41         std::cerr << server << ": " << "ERROR " << std::endl;
    42         return false;
    42         return false;
    43     }
    43     }
    44 
    44 
       
    45     if (PQstatus(conn) != CONNECTION_OK) {
       
    46         return false;
       
    47     }
       
    48 
    45     return true;
    49     return true;
    46 }
    50 }
    47 
    51 
    48 Abstract_DB::DB_RESULT PostgreSQL_DB::query (std::string sql_string)
    52 Abstract_DB::DB_RESULT PostgreSQL_DB::query (std::string sql_string)
    49 {
    53 {