Re: Running Command Line From Trigger? - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Running Command Line From Trigger?
Date
Msg-id 1144353260.32266.102.camel@state.g2switchworks.com
Whole thread Raw
In response to Running Command Line From Trigger?  ("Yudie Pg" <yudiepg@gmail.com>)
List pgsql-general
On Thu, 2006-04-06 at 14:48, Yudie Pg wrote:
> I want to execute a command line from trigger function.
> The reason is I want to execute my perl script from stored procedure.
>

Why not just install perl as a procedural language?  It's one of a dozen
or more available to you.  Then you can write the whole trigger in perl
instead of calling an external program.

Note that perl, like many other languages, is available in a "trusted"
and an "untrusted" version.  The trusted versions aren't allowed to do
dangerous things like access the file system and run external programs.
Untrusted will do anything that perl can do from the command line.

Note that plpgsql cannot run external programs on purpose.  It's a
security and safety issue.

pgsql-general by date:

Previous
From: "Yudie Pg"
Date:
Subject: Running Command Line From Trigger?
Next
From: Terry Lee Tucker
Date:
Subject: Re: Running Command Line From Trigger?