Обсуждение: Calling an external command via triggers

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

Calling an external command via triggers

От
"Ridvan Lakas ng Bayan S. Baluyos"
Дата:
Hi All,

Is it possible for me to call a certain command in the terminal via a trigger?

Say for example, after every INSERT in a certain table, I would be calling a script `php load.php` ?


Thanks,

Ridvan

--
リヅバン バルヨス
ridvan.baluyos@qualservcentral.com
http://ridvan.baluyos.net
http://www.onxiam.com/people/rbaluyos

Registered Linux User #439466
Registered Ubuntu User #16034
Q: Have you heard of the Object-Oriented way to get wealthy?
A: Inheritance.

Re: Calling an external command via triggers

От
"A. Kretschmer"
Дата:
am  Fri, dem 08.08.2008, um 14:22:43 +0800 mailte Ridvan Lakas ng Bayan S. Baluyos folgendes:
> Hi All,
>
> Is it possible for me to call a certain command in the terminal via a trigger?

Not really. You should better use LISTEN/NOTIFY.
>
> Say for example, after every INSERT in a certain table, I would be calling a
> script `php load.php` ?

What happens if the 'load.php' fails? Rollback the insert?


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net