Re: How can I run an external program from a stored procedure? - Mailing list pgsql-general

From Tom Lane
Subject Re: How can I run an external program from a stored procedure?
Date
Msg-id 12690.1275664165@sss.pgh.pa.us
Whole thread Raw
In response to How can I run an external program from a stored procedure?  ("Rob Richardson" <Rob.Richardson@rad-con.com>)
List pgsql-general
"Rob Richardson" <Rob.Richardson@rad-con.com> writes:
> Assume I have a program named FlashLightAndSoundHorn.exe.  In my
> database, there is a table that is read by some other program.  Records
> in that table have a timestamp, so I can tell how long they've been
> waiting.  I want a stored procedure that checks to see if a record has
> been waiting too long, and if it does, then it will run
> FlashLightAndSoundHorn.exe.  How do I run that program from inside a
> stored procedure?

If you write in plperlu or plpythonu then you can use those languages'
ordinary ability to run a subprocess.

            regards, tom lane

pgsql-general by date:

Previous
From: "Rob Richardson"
Date:
Subject: How can I run an external program from a stored procedure?
Next
From: Tom Lane
Date:
Subject: Re: cannot assign non-composite value to a row variable