[GENERAL] declare cursor with hold+fetch count vs PQsendQuery+PQsetSingleRowMode - resource consumption and the efficiency

2015-01-05 Thread sftf
Hello! I would like to use "pagination" in my intranet client app. My aims: - allow user to open and scroll large lists from query (without narrowing the query) - at the same time minimize time until the showing of large lists to the user - and at the same time minimize backend-frontend t

[GENERAL] libpq: why only one PQsendQuery per connection at a time?

2015-01-04 Thread sftf-misc
Hello! Question generally to (libpq) developers. According to http://www.postgresql.org/docs/9.4/static/libpq-async.html: "PQsendQuery cannot be called again (on the same connection) until PQgetResult has returned a null pointer, indicating that the command is done." As I guess this is also true