Skip site navigation (1) Skip section navigation (2)

Re: Execute Shell script after insert

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Hannes Dorbath" <light(at)theendofthetunnel(dot)de>
Cc: "Anderson dos Santos Donda" <andersondonda(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Execute Shell script after insert
Date: 2008-10-27 18:35:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Mon, Oct 27, 2008 at 12:21 PM, Hannes Dorbath
<light(at)theendofthetunnel(dot)de> wrote:
> Anderson dos Santos Donda wrote:
>> Is there a way to execute a simple shell script in server after execute
>> Example?
>> INSERT INTO clients (name) VALUES ('Donda');
>> after it, execute shell : mkdir $1
> You might find the following project useful:
> It adds sh as a procedural language to your PostgreSQL installation.
> Please be aware that there are the same security concerns as with all
> other untrusted procedural languages.

Note that if you can't get that to work (I think there were some
issues with it and the latest versions of pgsql) you use almost any
untrusted pl language to accomplish the same thing, plperlu, plphpu,
pltclu etc...

In response to

pgsql-general by date

Next:From: Hannes DorbathDate: 2008-10-27 18:37:36
Subject: Re: EXECUTE in trigger functions.
Previous:From: Hannes DorbathDate: 2008-10-27 18:21:24
Subject: Re: Execute Shell script after insert

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group