Re: Can the frontend get notifications from the postgres

Поиск
Список
Период
Сортировка
От A.Bhuvaneswaran
Тема Re: Can the frontend get notifications from the postgres
Дата
Msg-id Pine.LNX.4.44.0306171744330.10221-100000@Bhuvan.bksys.co.in
обсуждение исходный текст
Ответ на Re: Can the frontend get notifications from the postgres server?  (weigelt@metux.de)
Ответы Re: Can the frontend get notifications from the postgres server?  (weigelt@metux.de)
Список pgsql-admin
> > LISTEN/NOTIFY is yet another SQL. We can write a rule on an event and let
> > it notify. On the other hand, we can have a while(1) process which keeps
> > listening for that notification ie.. event. Once the event is occured, the
> > listening process would be notified. The listening process can be any
> > postgresql client including the one written in C, perl, php, etc.
> But the problem still is: how to receive the NOTIFY from an php script ?
> which function of the c-client lib can be used for this ?

In perl, if i am correct, DBD::Pg does not support it. But, Pg - Perl5
extension for postgresql does it. The functions consumeInput() and
notifies can be used to access the notifyname and pid of backend process.
Refer the man page of Pg module for details.

In C, the functions PQconsumeInput() and PQnotifies can be used to access
the notifyname and pid of backend process. Refer the libpq man page for
details.

In php 4.3.0, the function pg_get_notify() can be used to access the
notifyname and pid of backend process. For details, please refer the below
link:

http://www.science.uva.nl/ict/documentation/php4/function.pg-get-notify.html

Hope it helps.

regards,
bhuvaneswaran


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

Предыдущее
От: "Anagha Joshi"
Дата:
Сообщение: Notification
Следующее
От: "Brent Howard"
Дата:
Сообщение: Starting postgres on Solaris