Re: Multiple queries in transit

From: Jeroen Vermeulen <jtv(at)xs4all(dot)nl>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Mark Hills <Mark(dot)Hills(at)framestore(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Multiple queries in transit
Date: 2011-11-06 07:16:08
Message-ID: 4EB63438.9060208@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2011-11-03 17:26, Marko Kreen wrote:
> On Mon, Oct 31, 2011 at 7:09 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeroen Vermeulen 2011-11-06 07:28:52 Re: foreign key locks, 2nd attempt
Previous Message Robert Haas 2011-11-06 04:21:44 Re: Include commit identifier in version() function