Re: Can the frontend get notifications from the postgres

From: "A(dot)Bhuvaneswaran" <bhuvan(at)symonds(dot)net>
To: weigelt(at)metux(dot)de
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Can the frontend get notifications from the postgres
Date: 2003-06-17 12:27:32
Message-ID: Pine.LNX.4.44.0306171744330.10221-100000@Bhuvan.bksys.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

> > 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message weigelt 2003-06-17 12:38:53 Re: Can the frontend get notifications from the postgres server?
Previous Message Anagha Joshi 2003-06-17 12:13:10 Notification

Browse pgsql-sql by date

  From Date Subject
Next Message weigelt 2003-06-17 12:38:53 Re: Can the frontend get notifications from the postgres server?
Previous Message Eric Anderson Vianet SAO 2003-06-17 12:23:47 yet pg_toast reindex