Re: Multiple queries in transit

Поиск
Список
Период
Сортировка
От Jeroen Vermeulen
Тема Re: Multiple queries in transit
Дата
Msg-id 4EAF7C8E.7070402@xs4all.nl
обсуждение исходный текст
Ответ на Re: Multiple queries in transit  (Merlin Moncure <mmoncure@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Your review of pg_receivexlog/pg_basebackup
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: