Re: [GENERAL] C++, Postgres , libpqxx huge query

2014-05-05 Thread Alexandros Efentakis
Thanks John for your answer. The problem is how do I declare the cursor and fetch through C++ and libpq++? And if I fetch 1000 rows at a time, then how do I handle that when I reach the end and there are less than 1000 rows available? Or I need to fetch one row at a time like this http://stackoverf

Re: [GENERAL] C++, Postgres , libpqxx huge query

2014-05-05 Thread Alexandros Efentakis
To answer my own question, I adapted http://stackoverflow.com/questions/16128142/how-to-use-pqxxstateless-cursor-class-from-libpqxx try { work W(*Conn); pqxx::stateless_cursor cursor(W, sql[sqlLoad], "mycursor", false); /* Assume you know