pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: clayton cottingham <drfrog@smartt.com>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: Jeff Barrett <jbarrett@familynetwork.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: calling a shell script from pl/pgsql
Date: Mon, 10 Sep 2001 11:44:33 -0700
Message-ID: <3B9D0A11.CCD5C785@smartt.com> (raw)
References: <Pine.BSF.4.21.0109101018210.15401-100000@megazone23.bigpanda.com>

Stephan Szabo wrote:
> 
> On Mon, 10 Sep 2001, Jeff Barrett wrote:
> 
> > How can I call a shell script from within a pl/pgsql function that is called
> > as from a trigger. I do not want to interact with the script I just want it
> > to run. I do want the trigger to wait for the script it called to complete
> > before returning a value.
> >
> > Any ideas would be greatly appreciated.
> 
> I don't think you can do that from within pl/pgsql.  You'd probably need a
> function in pl/tclu or c.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


if its typical perl you should be able to 
use backticks
my $system=`date`;

$system should be set to the date

or if you dont need any data back as you say

then just

system('date');



view thread (7+ messages)  latest in thread

Message-ID: <3B9D0A11.CCD5C785@smartt.com>
Permalink:  ../3B9D0A11.CCD5C785@smartt.com/
Also on:    postgresql.org/message-id/3B9D0A11.CCD5C785@smartt.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: drfrog@smartt.com, sszabo@megazone23.bigpanda.com, jbarrett@familynetwork.com
  Subject: Re: calling a shell script from pl/pgsql
  In-Reply-To: <3B9D0A11.CCD5C785@smartt.com>

* 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