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


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
     subscribe-nomail command to [EMAIL PROTECTED] so that your
     message can get through to the mailing list cleanly

Reply via email to