Skip site navigation (1) Skip section navigation (2)

Re: Multiple queries in transit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Mark Hills <Mark(dot)Hills(at)framestore(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Multiple queries in transit
Date: 2011-10-31 17:09:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)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

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2011-10-31 17:45:06
Subject: Re: Multiple queries in transit
Previous:From: Kevin GrittnerDate: 2011-10-31 16:59:55
Subject: warning in pg_upgrade

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group