One could use an embedded SQL C program to update the table, and then have that
same program invoke another executable via exec() or system() calls.

If you are using Apache and this is an update based on form data from an HTML
document (aren't we all?), one should already be using CGI-BIN programming with
embedded SQL and be able to fit this right in.

Matt

-------- Original Message --------
Subject: Re: [NOVICE] postgres launch os applications
From: Andreas Kretschmer <akretschmer@spamfence.net>
Date: Tue, October 07, 2008 10:39 am
To: pgsql-novice@postgresql.org

Ertel, Steve <Steve.Ertel@infimatic.com> schrieb:

> I am trying to start an OS executable every time that a table is updated. I
> know that I should create a trigger on the table, but how do I launch the OS
> executable. I have a background in sql server. In it we would use something
> like xsp_execute(). I am looking for the equivalent function call in Postgres.

Write a trigger-function using an untrusted language like pl/perlU. You
can call arbitray commands within an untrusted language. With the
regular trusted languages such plpgsql or so you can't call external
programs.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice