Guest User

Untitled

a guest
Jul 9th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4. #include <pqxx/pqxx>
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9. string connection_inf = "host=127.0.0.1 port=5432 dbname=test user=postgres password=";
  10. pqxx::connection con(connection_inf);
  11. pqxx::work wrk(con);
  12. pqxx::result out = wrk.exec("SELECT * FROM tbl_ip");
  13. wrk.commit();
  14.  
  15. }
Add Comment
Please, Sign In to add comment