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

From Tom Lane
Subject Re: Multiple queries in transit
Date
Msg-id 29486.1320080988@sss.pgh.pa.us
Whole thread Raw
In response to Re: Multiple queries in transit  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Multiple queries in transit
Re: Multiple queries in transit
Re: Multiple queries in transit
Re: Multiple queries in transit
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> On 31.10.2011 17:44, Mark Hills wrote:
>> Could libpq be reasonably modified to allow this?

> I believe it's doable in theory, no-one has just gotten around to it. 
> Patches are welcome.

Can't you do that today with a multi-command string submitted to
PQsendQuery, followed by multiple calls to PQgetResult?

I'm hesitant to think about supporting the case more thoroughly than
that, or with any different semantics than that, because I think that
the error-case behavior will be entirely unintelligible/unmaintainable
unless you abandon all queries-in-flight in toto when an error happens.
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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: warning in pg_upgrade
Next
From: Heikki Linnakangas
Date:
Subject: Re: Multiple queries in transit