From: | Hans-Jürgen Schönig <postgres(at)cybertec(dot)at> |
---|---|
To: | Gevik babakhani <gevik(at)xs4all(dot)nl> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: executing OS programs from pg |
Date: | 2005-06-04 08:35:00 |
Message-ID: | 42A167B4.50301@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Gevik babakhani wrote:
> Dear people,
>
>
>
> Does anyone know how to execute an OS command from pgsql. I would like
> to create a trigger that op on firing would run/execute an external program.
>
> Does such functionality exist or do I have to write my own trigger
> function in C.
>
>
>
> Reagrds,
>
> Gevik.
>
>
>
Gevik,
Do something like that ...
CREATE OR REPLACE FUNCTION xclock() RETURNS int4 AS '
system("xclock");
return 1;
' LANGUAGE 'plperlu';
This should be fairly easy to implement but recall - you cannot rollback
xclock ;).
best regards,
hans
--
Cybertec Geschwinde u Schoenig
Schoengrabern 134, A-2020 Hollabrunn, Austria
Tel: +43/664/393 39 74
www.cybertec.at, www.postgresql.at
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2005-06-04 11:12:39 | Re: executing OS programs from pg |
Previous Message | Qingqing Zhou | 2005-06-04 06:54:26 | Re: psql: \d+ show tablespace of indices |