Thread: Run external program on a trigger?

Run external program on a trigger?

From
"Joost Kraaijeveld"
Date:
Hi all,

Is it possible to run an arbitrary external program on my Linux machine if a trigger fires?

Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl

Re: Run external program on a trigger?

From
Peter Eisentraut
Date:
Joost Kraaijeveld wrote:
> Is it possible to run an arbitrary external program on my Linux
> machine if a trigger fires?

Sure, just have the trigger procedure call the external program.  The
untrusted languages can do that, or if you want to go barebones, try
PL/sh (http://developer.postgresql.org/~petere/pgplsh/)/

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html


Re: Run external program on a trigger?

From
Peter Eisentraut
Date:
Joost Kraaijeveld wrote:
> Is it possible to run an arbitrary external program on my Linux
> machine if a trigger fires?

Sure, just have the trigger procedure call the external program.  The
untrusted languages can do that, or if you want to go barebones, try
PL/sh (http://developer.postgresql.org/~petere/pgplsh/)/

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html