db_bridge/postgresql_db.cpp
changeset 18 f3657061ec00
parent 17 b3731a25b9ec
child 20 5fec678f931b
equal deleted inserted replaced
17:b3731a25b9ec 18:f3657061ec00
    11     server = srv;
    11     server = srv;
    12     user = (usr != "") ? usr : getenv ("USER");
    12     user = (usr != "") ? usr : getenv ("USER");
    13     password = pwd;
    13     password = pwd;
    14     database = db;
    14     database = db;
    15 
    15 
    16     conninfo = "user=" + user + "dbname=" + database;
    16     conninfo = "user=" + user + " dbname=" + database;
    17 
    17 
    18     if (server != "" && pwd == "") {
    18     if (server != "" && pwd == "") {
    19         std::cout << "Passwort von " << user << "@" << server << ": ";
    19         std::cout << "Passwort von " << user << "@" << server << ": ";
    20         std::getline (std::cin, password);
    20         std::getline (std::cin, password);
    21         conninfo += " host=" + server + "password=" + password;
    21         conninfo += " host=" + server + " password=" + password;
    22     }
    22     }
    23 }
    23 }
    24 
    24 
    25 PostgreSQL_DB::~PostgreSQL_DB ()
    25 PostgreSQL_DB::~PostgreSQL_DB ()
    26 {
    26 {