[GENERAL] Running OS-level programs from Postgres?

2007-06-20 Thread Sean Murphy
Maybe this is a well duh kind of question, or maybe there's no straightforward way to do it, but is there any way that I could have a pg function initiate a process on the host system? Specifically I'd like to script an email to send off on an insert trigger, but the ability to initiate system

Re: [GENERAL] Running OS-level programs from Postgres?

2007-06-20 Thread Joshua D. Drake
Sean Murphy wrote: Maybe this is a well duh kind of question, or maybe there's no straightforward way to do it, but is there any way that I could have a pg function initiate a process on the host system? Yeah you can use any of the untrusted pl languages for that. Specifically I'd like to

Re: [GENERAL] Running OS-level programs from Postgres?

2007-06-20 Thread Shoaib Mir
If you can use tcl based pl function, the this might help you here -- http://sourceforge.net/projects/pgmail/ -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 6/20/07, Joshua D. Drake [EMAIL PROTECTED] wrote: Sean Murphy wrote: Maybe this is a well duh kind of question, or maybe there's

Re: [GENERAL] Running OS-level programs from Postgres?

2007-06-20 Thread Steve Atkins
On Jun 20, 2007, at 12:07 PM, Sean Murphy wrote: Maybe this is a well duh kind of question, or maybe there's no straightforward way to do it, but is there any way that I could have a pg function initiate a process on the host system? You can use pl/perlu or any of the other untrusted

Re: [GENERAL] Running OS-level programs from Postgres?

2007-06-20 Thread Philip Hallstrom
Maybe this is a well duh kind of question, or maybe there's no straightforward way to do it, but is there any way that I could have a pg function initiate a process on the host system? Specifically I'd like to script an email to send off on an insert trigger, but the ability to initiate system

Re: [GENERAL] Running OS-level programs from Postgres?

2007-06-20 Thread Andrew Sullivan
On Wed, Jun 20, 2007 at 12:55:23PM -0700, Steve Atkins wrote: Another approach, and one that can be more robust in the case of external failures, is to have the trigger put the message it wants to send into a queue table and have an external process that monitors the table (via polling or

Re: [GENERAL] Running OS-level programs from Postgres?

2007-06-20 Thread Tom Lane
Andrew Sullivan [EMAIL PROTECTED] writes: On Wed, Jun 20, 2007 at 12:55:23PM -0700, Steve Atkins wrote: Another approach, and one that can be more robust in the case of external failures, is to have the trigger put the message it wants to send into a queue table and have an external process

Re: [GENERAL] Running OS-level programs from Postgres?

2007-06-20 Thread Chris Browne
[EMAIL PROTECTED] (Sean Murphy) writes: My present need is for email notification; if there's a pg function or module that would handle this (I haven't turned up anything in my searches, but maybe I'm using the wrong search terms in the wrong places) I'd be OK for now, but I'd rather have the