#include <iostream>
#include <pqxx/pqxx>

using namespace std;

int main()
{
   try {
      pqxx::connection conn("host=localhost port=7483 dbname=tpch");
      pqxx::work work(conn);
      for (auto t:SQL select n_nationkey as id,n_name from nation)
         cout << t.id() << " " << t.n_name() << endl;
   } catch (const pqxx::pqxx_exception& e) {
      cerr << e.base().what() << endl;
      return 1;
   }
}

