Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 49B499F9385 for ; Thu, 4 Oct 2007 23:15:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 66234-07 for ; Thu, 4 Oct 2007 23:14:59 -0300 (ADT) X-Greylist: delayed 00:12:12.645403 by SQLgrey-1.7.5 Received: from mail.illumen.com (unknown [64.207.29.137]) by postgresql.org (Postfix) with ESMTP id 7F4DD9F9382 for ; Thu, 4 Oct 2007 23:14:59 -0300 (ADT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C806F3.D112B5C0" X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: Executing external program from stored procedure Date: Thu, 4 Oct 2007 20:02:43 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Executing external program from stored procedure Thread-Index: AcgG89DiHYjE9nXtQYyi6zLmqvmnfA== From: "Benjamin Krajmalnik" To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/22 X-Sequence-Number: 26936 This is a multi-part message in MIME format. ------_=_NextPart_001_01C806F3.D112B5C0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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. =20 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. =20 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. =20 Any suggestions are welcome :) =20 Regards, =20 Benjamin ------_=_NextPart_001_01C806F3.D112B5C0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Is = there a way to=20 execute an external program from within a stored = procedure?
In = pl/pgsql it does=20 not appear to be supported.
Will = pl/perl allow=20 me to do so?
A = little=20 background.  I have a network monitoring platform which we = developed. =20 The collector has the capability of issuing a single query for each test = it=20 performs.  We hae a massive stored procedure which aggreates data = in real=20 time and then stores the individual test data in the database.  = This has=20 some great pluses, in which we can graph averages of various tests, = which cannot=20 be done with something like rrdtool.  On the downside, while = relatively=20 fast, it is not as fast in rendering a graph as = rrdtool.
 
The = stored procedure=20 is written in pl/pgsql.  I would like, for each test, to call = rrdtool and=20 insert a reading in the tests rrd database.  This will allow us to = render=20 certain graphs much quicker.
 
Is = there a way in=20 pl/perl to call an outside  program?  IN this case I would = have out=20 pl/pgsql procedure call a pl/perl p[rocedure, passing the relevant = arguments,=20 and have it call rrdtool to insert the data point.
 
Any = suggestions are=20 welcome :)
 
Regards,
 
Benjamin
------_=_NextPart_001_01C806F3.D112B5C0--