Trigger that will execute external program

Поиск
Список
Период
Сортировка
Искать

Trigger that will execute external program

От:
"David Loh" <david@bizsurf.com>
Дата:
Hi all.
I'd like to know if postgresql has the capability of execute external program with the trigger, for example, I had a trigger call "exceed_limit", when this trigger has fire, instead of update other relations, it will also execute a external program '/bin/send_email', is that possble ?
If it's possible, can any of you guy please show me how to do it ?
Thanks in advance.

Re: Trigger that will execute external program

От:
"Tomasz Myrta" <jasiek@klaster.net>
Дата:
> Hi all.
> I'd like to know if postgresql has the capability of execute 
> external program with the trigger, for example, I had a trigger call 
> "exceed_limit", when this trigger has fire, instead of update other 
> relations, it will also execute a external program '/bin/send_email',
>  is that possble ? If it's possible, can any of you guy please show 
> me how to do it ? Thanks in advance.
Read Postgresql documentation: 21.4. Trusted and Untrusted PL/Perl.
Probably C functions have also ability for running system commands.
Regards,
Tomasz Myrta

Re: Trigger that will execute external program

От:
Hans-Jürgen Schönig <hs@cybertec.at>
Дата:
Try Peter Eisentrauts PL/Sh - it is pretty cool ...
If you don't like that try PL/PerlU or C.
   Regards,
       Hans

-- 
*Cybertec Geschwinde u Schoenig*
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/1/913 68 09; +43/664/233 90 75
www.postgresql.at , cluster.postgresql.at 
, www.cybertec.at 
, kernel.cybertec.at 


Re: Trigger that will execute external program

От:
Jan Wieck <JanWieck@Yahoo.com>
Дата:
Hans-Jürgen Schönig wrote:
> 
> Try Peter Eisentrauts PL/Sh - it is pretty cool ...
> If you don't like that try PL/PerlU or C.

And don't forget to do at least one of them in PL/TclU, just to have all
the animals in your zoo ;-)

Jan

> 
>     Regards,
> 
>         Hans
> 
> --
> *Cybertec Geschwinde u Schoenig*
> Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
> Tel: +43/1/913 68 09; +43/664/233 90 75
> www.postgresql.at , cluster.postgresql.at
> , www.cybertec.at
> , kernel.cybertec.at 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #

FAQ