From: | Iker Arizmendi <iker(at)research(dot)att(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: [RFC] libpq extensions - followup |
Date: | 2003-01-26 07:00:19 |
Message-ID: | 20030126020019.02bf90fe.iker@research.att.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Althought multiple queries can't be executed concurrently they can be
queued up by a connection object. For instance:
PGXquery* q1 = PQXcreateQuery(...);
PGXquery* q2 = PQXcreateQuery(...);
...
PGXquery* qN = PQXcreateQuery(...);
PQXexecute(conn1, q1);
PQXexecute(conn1, q2);
...
PQXexecute(conn1, qN);
while (1) { /* event loop code */ }
In this example, queries q1 through qN are "in flight" simultaneously as
far as the client is concerned even though the connection conn1 is
really queueing them up. During execution of the event loop, the
connection object manages the job of executing each query
sequentially (which, with respect to the client, is an implementation
detail).
Cheers,
Iker
On Sun, 26 Jan 2003 00:47:20 -0500
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Iker Arizmendi <iker(at)research(dot)att(dot)com> writes:
> > A while back I suggested that it would be useful if asynchronous
> > connections could support multiple queries "in flight", especially
> > if you're working on event driven applications (see topic "rfc -
> > libpq extensions"). I've since started work on a simple library,
>
> I must be missing something fundamental here. The backend doesn't
> support multiple parallel queries, so how can you have "multiple
> queries in flight" on the same connection?
>
> regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alan T. Miller | 2003-01-26 07:05:58 | Can object oriented table design help to solve this problem? |
Previous Message | Tom Lane | 2003-01-26 05:47:20 | Re: [RFC] libpq extensions - followup |