Calling external program from trigger

Поиск
Список
Период
Сортировка
От Kaare Rasmussen
Тема Calling external program from trigger
Дата
Msg-id 200305201130.02343.kar@kakidata.dk
обсуждение исходный текст
Ответы Re: Calling external program from trigger  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Re: Calling external program from trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi

I would like to notify a server whenever a certain table is updated.

I wonder if this hasn't been solved before. I looked at contrib and Gborg with 
no success. Maybe it could be a function that would be called with parameters 
like host, port and message.

I wouldn't like to use untrusted Perl for just this purpose. 

Currently I use cron but there are at least two disadvantages:

1. There can be a delay up to 59 seconds. And more if the cron job is set not 
to run every minute.
2. The server has to poll often (in my case every minute), leading to 
unnecessary database and bandwidth usage.

These disadvantages are especially annoying when the job is invoked only once 
in a while, but the user expects to see the result asap.

-- 
Kaare Rasmussen            --Linux, spil,--        Tlf:        3816 2582
Kaki Data                tshirts, merchandize      Fax:        3816 2501
Howitzvej 75               Åben 12.00-18.00        Email: kar@kakidata.dk
2000 Frederiksberg        Lørdag 12.00-16.00       Web:      www.suse.dk


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Heads up: 7.3.3 this Wednesday
Следующее
От: "A.Bhuvaneswaran"
Дата:
Сообщение: Re: Heads up: 7.3.3 this Wednesday