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

From Jeroen Vermeulen
Subject Re: Multiple queries in transit
Date
Msg-id 4EB63438.9060208@xs4all.nl
Whole thread Raw
In response to Re: Multiple queries in transit  (Marko Kreen <markokr@gmail.com>)
List 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 by date:

Previous
From: "Tomas Vondra"
Date:
Subject: Re: [PATCH] optional cleaning queries stored in pg_stat_statements
Next
From: Jeroen Vermeulen
Date:
Subject: Re: foreign key locks, 2nd attempt