On 2011-11-01 00:53, Merlin Moncure wrote:
On Mon, Oct 31, 2011 at 12:49 PM, Mark Hills<mark.hi...@framestore.com>  wrote:

Furthermore, in most apps it'd be a serious PITA to keep track of which
reply is for which query, so I doubt that such a feature is of general
usefulness.

In our UI case, we already have a queue. Because libpq can't pipeline
multiple queries, we have to make our own queue of them anyway.

In libpqxx (the C++ API) you do get support for this kind of pipelining. Look for the "pipeline" class. It uses the "concatenate queries, retrieve multiple results" trick.

The pipeline also serves as an easy-to-manage interface for asynchronous querying: fire off your query, go do other things while the server is working, then ask for the result (at which point you'll block if necessary).

Front page: http://pqxx.org/development/libpqxx/

Pipeline class: http://pqxx.org/devprojects/libpqxx/doc/stable/html/Reference/a00062.html

Jeroen

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to