run shell command from pl/pgsql - Mailing list pgsql-novice

From Jules Alberts
Subject run shell command from pl/pgsql
Date
Msg-id 200211180844.gAI8ieJO014717@artemis.cuci.nl
Whole thread Raw
List pgsql-novice
Hello all,

I'm working on a pg database that should be able to run commands on
certain conditions. E.g. whenever a date is stored in column X of table
Y, an email should be sent to user Z. Creating a triggered function is
easy enough but how do I invoke the command? Also, I want to use
variables in the executed command, something like:

    m_address := ''me@myself.org'';
    m_subject := ''this is a test'';
    runcommand(''mail -s '' + m_subject + m_address);

I guess the answer is very obvious, but I couldn't find it. TIA for any
help!

--
Jules Alberts.

pgsql-novice by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: Help with PostgreSQL Access
Next
From: "Henshall, Stuart - Design & Print"
Date:
Subject: Re: run shell command from pl/pgsql