Re: Multiple queries in transit - Mailing list pgsql-hackers

From Jeroen Vermeulen
Subject Re: Multiple queries in transit
Date
Msg-id 4EAF7C8E.7070402@xs4all.nl
Whole thread Raw
In response to Re: Multiple queries in transit  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
On 2011-11-01 00:53, Merlin Moncure wrote:
> On Mon, Oct 31, 2011 at 12:49 PM, Mark Hills<Mark.Hills@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
"concatenatequeries, 
 
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


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Your review of pg_receivexlog/pg_basebackup
Next
From: Jeff Davis
Date:
Subject: Re: