Re: Multiple simultaneous queries on single connection

From: Yeb Havinga <yeb(dot)havinga(at)portavita(dot)nl>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Multiple simultaneous queries on single connection
Date: 2009-08-19 15:15:24
Message-ID: 4A8C170C.1050703@portavita.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello Craig, list
>> Is there a way to have two or more connections see each others
>> uncommitted things?
>
> Not at present.
>
> You should be able to use explicitly declared cursors and FETCH to
> interleave requests for results from one or more queries in the same
> transation using the one connection, but only one FETCH may be active
> at a time.
Thanks for your info. I verified with a pl/pgsql function that from a
pl/pgsql perspective, this is a good solution. However, our client
application needs to access the postgres backend with libpq. I'm
currently looking at PQsendPrepare / PQSendQueryPrepared together with
what the exec_execute_message does. Each of these has a portal name as
parameter. It would be nice if PQgetResult could also provide a portal
name to fetch a result from. The question is how to multiplex data from
different portals on the tcp/ip connection, or maybe have more than one
tcp/ip connection per PQconn object when more than one portal is active
at the same time.

--
Yeb

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Marc Mamin 2009-08-19 15:46:33 Re: Ask To Optimize Looping
Previous Message Joshua Tolley 2009-08-19 14:00:40 Re: Ask About SQL