Re: calling a shell script from pl/pgsql

Поиск
Список
Период
Сортировка
От clayton cottingham
Тема Re: calling a shell script from pl/pgsql
Дата
Msg-id 3B9D0A11.CCD5C785@smartt.com
обсуждение исходный текст
Ответ на Re: calling a shell script from pl/pgsql  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-sql
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');


В списке pgsql-sql по дате отправления:

Предыдущее
От: Alex Pilosov
Дата:
Сообщение: Re: pl/sh (was Re: calling a shell script from pl/pgsql)
Следующее
От: "Jeff Barrett"
Дата:
Сообщение: Re: calling a shell script from pl/pgsql