Re: How can I run an external program from a stored procedure?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rob Richardson" <Rob(dot)Richardson(at)rad-con(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I run an external program from a stored procedure?
Date: 2010-06-04 15:09:25
Message-ID: 12690.1275664165@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Rob Richardson" <Rob(dot)Richardson(at)rad-con(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-06-04 15:23:35 Re: cannot assign non-composite value to a row variable
Previous Message Rob Richardson 2010-06-04 15:03:52 How can I run an external program from a stored procedure?