On Monday 17 Jun 2002 2:06 pm, Dustin Dortch wrote:
> Is there a stored procedure that
> allows for the execution of shell commands? I think it would be great.
> What I would like to accomplish is when a customer is added to my CRM
> application, a script is executed on my shell. Obviously, I woud need to
> create a trigger on my user table and have it run a stored procedure, etc.
You *could* do this, see the manuals about adding a 'C' function to
PostgreSQL. However, a better way might be to LISTEN on a connection for a
NOTIFY from your trigger. This means rather than your database running a
program with it's privileges it just states that something has happened and
your unprivileged client can then decide what to do.
- Richard Huxton