I am using c++11 and pqxx to access postgresql database and I need id of inserted row and flag if it was successful or not. How to get after executing INSERT into database fetch id of inserted row ? I have tried to find example on net but without success.
work txn(*conn);
txn.prepared("insert ")(person_name).exec();
txn.commit();