From: | Thomas Good <tomg(at)q8(dot)nrnet(dot)org> |
---|---|
To: | "Chau, Artemis" <artemis(dot)chau(at)intel(dot)com> |
Cc: | "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: trigger to run external script |
Date: | 2000-09-26 18:52:00 |
Message-ID: | Pine.LNX.3.96.1000926144702.13649A-100000@q8.nrnet.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Tue, 26 Sep 2000, Chau, Artemis wrote:
> All,
> I want to have a trigger for a table that whenever a new record is created
> to run an external shell script on Unix.
> Any suggestion?
>
> -- Artemis
Artemis - what is it you want the script to do? I do this - but my
IF is perl. When the user INSERTs INTO a table (without error)
my script generates email to any interested parties. If the user
makes an error my script dumps detailed info (including username)
into a log file.
If you want to do something similar, it is relatively easy via
shell script or perl...presumably in any interface really.
So the issue is only: do your users enter data from a psql sh prompt
or from an IF? If they use psql then you could define a trigger that
makes an entry into a second table...
--------------------------------------------------------------------
SVCMC - Center for Behavioral Health
--------------------------------------------------------------------
Thomas Good tomg@ { admin | q8 } .nrnet.org
IS Coordinator / DBA Phone: 718-354-5528
Fax: 718-354-5056
--------------------------------------------------------------------
Powered by: PostgreSQL s l a c k w a r e FreeBSD:
RDBMS |---------- linux The Power To Serve
--------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Joel Mc Graw | 2000-09-27 02:25:03 | Re: trigger to run external script |
Previous Message | Chau, Artemis | 2000-09-26 18:26:17 | trigger to run external script |