Search Postgresql Archives

Re: NOTIFY/LISTEN why is not a callback as notice processing.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 10, 2010 at 5:20 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
> Not in libpq.  libpq is just a passive library, it can't cause actions
> to happen when you aren't calling it.  So there's no point in a
> callback: you might as well just test for occurrences of a NOTIFY at
> times when you're prepared to handle it.
>

On my systems where I use them more or less as "wakeup and do work"
signals, I just do a select() call on the connection socket.  When the
signal arrives, the socket becomes readable, and then I just query for
the notification.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux