Re: [RFC] libpq extensions - followup

Поиск
Список
Период
Сортировка
От Iker
Тема Re: [RFC] libpq extensions - followup
Дата
Msg-id 00c101c2c50a$c707fed0$6401a8c0@KNUTH
обсуждение исходный текст
Ответ на Re: [RFC] libpq extensions - followup  (Iker Arizmendi <iker@research.att.com>)
Список pgsql-general
BTW, the source tarball contains two example programs - an event-driven
version which demonstrates simulating multiple "in-flight" queries and a
multi-threaded version.

Cheers,
Iker


----- Original Message -----
From: "Iker Arizmendi" <iker@research.att.com>
Newsgroups:
comp.databases.postgresql.general,comp.databases.postgresql.questions
Sent: Sunday, January 26, 2003 2:02 AM
Subject: Re: [RFC] libpq extensions - followup


> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


В списке pgsql-general по дате отправления:

Предыдущее
От: Francisco J Reyes
Дата:
Сообщение: Re: Status of tablespaces
Следующее
От: "Ivar"
Дата:
Сообщение: Re: ??? Multiple selects in procedure