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

Re: Multiple queries in transit

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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-10-31 17:49:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, Oct 31, 2011 at 12:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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?

Multi command string queries don't support parameterization.  The way
I do it is to keep an application managed stack of data (as an array
of record types) to send that is accumulated when the last stack is in
transit.  Then when the last response comes in you repeat.

Of course, if you could parameterize a multi command string statement,
that might be a better way to go.


In response to


pgsql-hackers by date

Next:From: Mark HillsDate: 2011-10-31 17:49:45
Subject: Re: Multiple queries in transit
Previous:From: Heikki LinnakangasDate: 2011-10-31 17:45:06
Subject: Re: Multiple queries in transit

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