Re: Non-blocking queries in postgresql

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: jcajal(at)tcpsi(dot)es (Javier Cajal)
Cc: hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: Re: Non-blocking queries in postgresql
Date: 1999-01-26 15:43:45
Message-ID: 199901261543.KAA12203@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Bruce Momjian wrote:
>
> > > Thank you very much for the response of the other mail i`ve sent.
> > > I want to make you a very important question. This is critical
> > for
> > > my pourposes and i cannot find a clear answer in the documentation
> > of
> > > postgres.
> > > There is a capability in Oracle that allows you to make
> > > "non-blocking queries". That`s it. The normal query from a program,
> > > throw an API to the DBMS, opens a socket, and waits untill the
> > response
> > > comes. But the other way, returns the control inmediatly and the
> > user
> > > must poll on this socket to know when the answer comes.
> > > My english is poor, but i hope you`ve understood what i`m
> > talking
> > > about. If it is not allowed in postgres i cannot use it as my
> > database.
> > > I have to make queries to other machines, and i cannot wait untill
> > the
> > > connection is made, and the response comes.
> > > There is PQexec and i want to know how i could make a PQexecNB
> > > (non-blocking). In Oracle this is the diference of the two funcion
> > calls
> > > to the API.
> >
> > New feature in 6.4.*. See the libpq manual under async. You can send
> > a
> > query and poll to see when the result is ready. See PQsendQuery() C
> > function call. Also mention in the manuals in the docs directory.
> > You
> > can also use C function select() to wait for data from any number of
> > concurrent backend sockets.
> >
> > --
> > Bruce Momjian | http://www.op.net/~candle
> > maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> > + If your life is a hard drive, | 830 Blythe Avenue
> > + Christ can be your backup. | Drexel Hill, Pennsylvania
> > 19026
>
> Thank you very much!!!
> But I have a llitle problem. I`m afraid that the lipq++ interface
> doesn't have this funcion call. Is it true?
> Have you got any examples of the using of PQsendQuery and Non Blocking
> queries using this interface lipq or libpq++? I will be very usefull for
> me. Just simply attach it on the response.
>
> It would be very appreciated. Thank you again.

Maybe it hasn't been added to libpq++ yet.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Browse pgsql-hackers by date

  From Date Subject
Next Message Goran Thyni 1999-01-26 16:39:36 Re: alloca (was: Postgres Speed or lack thereof)
Previous Message D'Arcy J.M. Cain 1999-01-26 14:12:46 Re: [HACKERS] Primary keys additional