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.