35 std::ostringstream
cmd;
37 cmd <<
"SELECT * FROM pg_tables where tablename = '" <<
table <<
"'";
40 std::cout << cmd.str() << std::endl;
51 if (message.find(
"does not exist") == std::string::npos)
53 std::cout <<
"Exception caught" << std::endl;
54 std::cout <<
"Message: " << e.
getMessage() << std::endl;
61 cmd <<
"CREATE TABLE " << table <<
"(runnumber int, primary key(runnumber))";
68 std::cout <<
"caught exception Message: " << e.
getMessage() << std::endl;
76 std::ostringstream
cmd;
79 std::cout <<
"Problem creating " <<
table << std::endl;
82 cmd <<
"SELECT * FROM " <<
table <<
" LIMIT 1";
91 std::cout << __PRETTY_FUNCTION__ <<
"Exception caught" << std::endl;
92 std::cout <<
"Message: " << e.
getMessage() << std::endl;
102 if (exceptionmessage.find(
"not found in result set") != std::string::npos)
105 cmd <<
"ALTER TABLE "
117 std::cout <<
"Exception caught: " << e2.
getMessage() << std::endl;
129 std::cout <<
"problem" << std::endl;
137 std::ostringstream
cmd;
138 cmd <<
"INSERT INTO "
140 <<
" (runnumber) VALUES ("
158 std::ostringstream
cmd;
159 cmd <<
"SELECT runnumber FROM "
161 <<
" WHERE runnumber = "
172 std::cout <<
"exception caught: " << e.
getMessage() << std::endl;
184 std::cout <<
"exception caught: " << e.
getMessage() << std::endl;
199 std::cout << __PRETTY_FUNCTION__ <<
"Problem encountered, cannot do update" << std::endl;
204 std::cout << __PRETTY_FUNCTION__ <<
"Problem updating runnumber encountered, cannot do update" << std::endl;
208 std::ostringstream
cmd;
213 <<
" where runnumber = "
222 std::cout <<
"Cannot create statement" << std::endl;
233 std::cout << __PRETTY_FUNCTION__ <<
"Exception caught" << std::endl;
234 std::cout <<
"Message: " << e.
getMessage() << std::endl;
252 std::cout << __PRETTY_FUNCTION__
253 <<
" Exception caught during DriverManager::getConnection" << std::endl;
254 std::cout <<
"Message: " << e.
getMessage() << std::endl;