Skip site navigation (1) Skip section navigation (2)

Re: Server->Client notification (without polling)?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wolfgang Keller <wolfgang(dot)keller(dot)nospam(at)gmx(dot)de>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Server->Client notification (without polling)?
Date: 2006-09-20 20:15:43
Message-ID: 18270.1158783343@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Wolfgang Keller <wolfgang(dot)keller(dot)nospam(at)gmx(dot)de> writes:
> I read the manual again and now I understand that it's the libpq client 
> library which requires polling a function to retrieve the notifications 
> received from the server. Is there no way to tell the library "please call me
> when a notification arrives"?

No, because it's only a library, it doesn't have its own thread of
control.

If you are so inclined you can set up your application's main loop to
watch for input on the database connection's socket (along with whatever
other event sources it watches) and then call the library to see what it
was.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Michael FuhrDate: 2006-09-21 03:08:07
Subject: Re: Server->Client notification (without polling)?
Previous:From: Folkert van HeusdenDate: 2006-09-20 20:06:45
Subject: Re: installing postgresql 8.1.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group