I was wrong in saying not able to initialized a reverse_iterator with a 
interator.  I must confused with something else.  Or maybe I got that in a 
dream.

But still, in this case, there's not need to create a new reverse_iterator 
variable.  Things will be fine if we do this:

 const result R = T.exec("SELECT * FROM " + Table + " ORDER BY num DESC");
 ++i;
 for (result::const_iterator r = R.begin(); r != R.end(); ++r) {
    --i;
    if (r->at(0).as(0) != (*i)[0])
 throw logic_error("Writing numbers with tablewriter went wrong: "
     "expected " + to_string((*i)[0]) + ", found " + r[0].c_str());
 }

    T.commit();

xiaofeng 

_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to