Calling external program from trigger

From: Kaare Rasmussen <kar(at)kakidata(dot)dk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Calling external program from trigger
Date: 2003-05-20 09:30:02
Message-ID: 200305201130.02343.kar@kakidata.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)kakidata(dot)dk
2000 Frederiksberg Lørdag 12.00-16.00 Web: www.suse.dk

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shridhar Daithankar 2003-05-20 10:08:53 Re: pg_dump
Previous Message Dave Page 2003-05-20 07:17:29 Re: -L${WX_HOME}/lib missing!