Thread: triggers

triggers

From
"Stian Riis"
Date:
Hi.

Does anyone know if it is posible to make a trigger that execute an
external program ? I want to execute a another program on the server
when I get a row in one of my tables...

-Stian



Re: triggers

From
Richard Huxton
Date:
On Friday 11 Oct 2002 2:48 pm, Stian Riis wrote:
> Hi.
>
> Does anyone know if it is posible to make a trigger that execute an
> external program ? I want to execute a another program on the server
> when I get a row in one of my tables...

The customary way is to have a "helper" process that sits there LISTENing for
a NOTICE and then calls the external program as required. Cleaner and means
the other program doesn't have any direct connection to the Postgresql
backend.

- Richard Huxton


Re: triggers

From
Achilleus Mantzios
Date:
On Fri, 11 Oct 2002, Richard Huxton wrote:

>
> The customary way is to have a "helper" process that sits there LISTENing for
> a NOTICE and then calls the external program as required. Cleaner and means
> the other program doesn't have any direct connection to the Postgresql
> backend.
>
> - Richard Huxton

Yet another cool feature (ala java listeners) of postgresql.

P.S.

Is the word "thank you" too difficult to be written
by people posting and reading??

If anything else, a "thank you" is a motive.

==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com       mantzios@softlab.ece.ntua.gr