From fa31e7c6a729a5e9772bfd775d19501996652f30 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 25 Jul 2012 11:32:54 +0200 Subject: Fix PostgreSQL test template to do the same as in other databases --- pgsql/template/driver.cxx | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'pgsql/template/driver.cxx') diff --git a/pgsql/template/driver.cxx b/pgsql/template/driver.cxx index 755aaeb..329c91c 100644 --- a/pgsql/template/driver.cxx +++ b/pgsql/template/driver.cxx @@ -9,17 +9,35 @@ #include #include +#include +#include + +#include + +#include "test.hxx" +#include "test-odb.hxx" + using namespace std; +using namespace odb::core; int -main () +main (int argc, char* argv[]) { try { + auto_ptr db (create_database (argc, argv)); + + // + // cout << "test 001" << endl; + { + transaction t (db->begin ()); + t.commit (); + } } - catch (...) + catch (const odb::exception& e) { + cerr << e.what () << endl; return 1; } } -- cgit v1.1