Re: Can the frontend get notifications from the postgres

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: Can the frontend get notifications from the postgres
Дата
Msg-id Pine.LNX.4.33.0306170605270.1572-100000@css120.ihs.com
обсуждение исходный текст
Ответ на 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
On Tue, 17 Jun 2003 weigelt@metux.de wrote:

> On Tue, Jun 17, 2003 at 12:07:31PM +0530, A.Bhuvaneswaran wrote:
>
> <snip>
> > 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 ?

If you're talking about a PHP script running under apache as a module or
CGI, then you probably can't (or if you can, you shouldn't due to time out
issues and such.)

Note that PHP really is a "real programming language", and if you write a
program to execute from the command line and detach it can run in the back
ground like any other language, even starting child processes and having
IPC and all that.  Look up the "Process Control Functions" for more on
satrting child processes and all.

Note that the pcntl_* functions are not guaranteed to behave when run
under apache / as a CGI etc...


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

Предыдущее
От: weigelt@metux.de
Дата:
Сообщение: Re: Can the frontend get notifications from the postgres server?
Следующее
От: "Anagha Joshi"
Дата:
Сообщение: Notification