From: Benjamin Krajmalnik <kraj@illumen.com>
To: pgsql-admin@postgresql.org
Subject: Executing external program from stored procedure
Date: Thu, 4 Oct 2007 20:02:43 -0600
Message-ID: <F4E6A2751A2823418A21D4A160B689880E8D36@fletch.stackdump.local> (raw)
Is there a way to execute an external program from within a stored
procedure?
In pl/pgsql it does not appear to be supported.
Will pl/perl allow me to do so?
A little background. I have a network monitoring platform which we
developed. The collector has the capability of issuing a single query
for each test it performs. We hae a massive stored procedure which
aggreates data in real time and then stores the individual test data in
the database. This has some great pluses, in which we can graph
averages of various tests, which cannot be done with something like
rrdtool. On the downside, while relatively fast, it is not as fast in
rendering a graph as rrdtool.
The stored procedure is written in pl/pgsql. I would like, for each
test, to call rrdtool and insert a reading in the tests rrd database.
This will allow us to render certain graphs much quicker.
Is there a way in pl/perl to call an outside program? IN this case I
would have out pl/pgsql procedure call a pl/perl p[rocedure, passing the
relevant arguments, and have it call rrdtool to insert the data point.
Any suggestions are welcome :)
Regards,
Benjamin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: kraj@illumen.com
Subject: Re: Executing external program from stored procedure
In-Reply-To: <F4E6A2751A2823418A21D4A160B689880E8D36@fletch.stackdump.local>
References: <F4E6A2751A2823418A21D4A160B689880E8D36@fletch.stackdump.local>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox