Re: [RFC] libpq extensions - followup
От | Iker Arizmendi |
---|---|
Тема | Re: [RFC] libpq extensions - followup |
Дата | |
Msg-id | 20030126020019.02bf90fe.iker@research.att.com обсуждение исходный текст |
Ответ на | Re: [RFC] libpq extensions - followup (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [RFC] libpq extensions - followup
|
Список | 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@sss.pgh.pa.us> wrote: > Iker Arizmendi <iker@research.att.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
В списке pgsql-general по дате отправления: