From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | "Dustin Dortch" <dustin_dortch(at)earthlink(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Stored Procedures for Shell Execution |
Date: | 2002-06-18 13:45:52 |
Message-ID: | 200206181445.52492.dev@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Treat | 2002-06-18 13:54:25 | Re: Help automate pg_dump |
Previous Message | Fabricio Boppre | 2002-06-18 13:41:37 | number of registers of a table |