Re: triggers

Lists: pgsql-sql
From: "Stian Riis" <stian(at)elineweb(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: triggers
Date: 2002-10-11 13:48:07
Message-ID: 000a01c2712c$d46e66e000a8c0@dali
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

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


From: Richard Huxton <dev(at)archonet(dot)com>
To: "Stian Riis" <stian(at)elineweb(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: triggers
Date: 2002-10-11 14:19:06
Message-ID: 200210111519.06516.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

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


From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Stian Riis <stian(at)elineweb(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: triggers
Date: 2002-10-11 15:19:38
Message-ID: Pine.LNX.4.44.0210111816580.29037-100000@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

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(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr