<html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;">One could use an embedded SQL C program to update the table, and then have that<br>same program invoke another executable via exec() or system() calls.<br><br>If you are using Apache and this is an update based on form data from an HTML<br>document (aren't we all?), one should already be using CGI-BIN programming with<br>embedded SQL and be able to fit this right in.<br><br>Matt<br><br>
<blockquote webmail="1" style="border-left: 2px solid blue; margin-left: 8px; padding-left: 8px; font-size: 10pt; color: black; font-family: verdana;">
-------- Original Message --------<br>
Subject: Re: [NOVICE] postgres launch os applications<br>
From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net><br>
Date: Tue, October 07, 2008 10:39 am<br>
To: pgsql-novice(at)postgresql(dot)org<br>
<br>
Ertel, Steve <Steve(dot)Ertel(at)infimatic(dot)com> schrieb:<br>
<br>
> I am trying to start an OS executable every time that a table is updated. I<br>
> know that I should create a trigger on the table, but how do I launch the OS<br>
> executable. I have a background in sql server. In it we would use something<br>
> like xsp_execute(). I am looking for the equivalent function call in Postgres.<br>
<br>
Write a trigger-function using an untrusted language like pl/perlU. You<br>
can call arbitray commands within an untrusted language. With the<br>
regular trusted languages such plpgsql or so you can't call external<br>
programs.<br>
<br>
<br>
Andreas<br>
-- <br>
Really, I'm not out to destroy Microsoft. That will just be a completely<br>
unintentional side effect. (Linus Torvalds)<br>
"If I was god, I would recompile penguin with --enable-fly." (unknown)<br>
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°<br>
<br>
-- <br>
Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)<br>
To make changes to your subscription:<br>
<a href="http://www.postgresql.org/mailpref/pgsql-novice" target="_blank" mce_href="http://www.postgresql.org/mailpref/pgsql-novice">http://www.postgresql.org/mailpref/pgsql-novice</a><br>
</blockquote></span></body></html>