Re: Multiple queries in transit

Поиск
Список
Период
Сортировка
От Jeroen Vermeulen
Тема Re: Multiple queries in transit
Дата
Msg-id 4EB63438.9060208@xs4all.nl
обсуждение исходный текст
Ответ на Re: Multiple queries in transit  (Marko Kreen <markokr@gmail.com>)
Список pgsql-hackers
On 2011-11-03 17:26, Marko Kreen wrote:
> On Mon, Oct 31, 2011 at 7:09 PM, Tom Lane<tgl@sss.pgh.pa.us>  wrote:
>> Can't you do that today with a multi-command string submitted to
>> PQsendQuery, followed by multiple calls to PQgetResult?
>
> It's more annoying to to error handling on that, plus it still keeps the
> blocking behaviour, just with larger blocks.

You can combine multi-command query strings with nonblocking mode, 
without any change in libpq itself.

In fact that's exactly what the libpqxx "pipeline" class does.  So if 
you're working in C++, you already have this feature at your disposal.


> Also I would ask for opposite feature: "multiple rows in flight".
> That means that when server is sending big resultset,
> the app can process it row-by-row (or by 10 rows)
> without stopping the stream and re-requesting.

Cursors.


Jeroen


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Tomas Vondra"
Дата:
Сообщение: Re: [PATCH] optional cleaning queries stored in pg_stat_statements
Следующее
От: Jeroen Vermeulen
Дата:
Сообщение: Re: foreign key locks, 2nd attempt