如何在PostgreSQL触发器中执行.jar文件

时间:2019-07-13 07:58:03

标签: postgresql

如何在Postgre sql触发器中执行.jar文件?

CREATE OR REPLACE FUNCTION pytrig() RETURNS trigger
   LANGUAGE plpythonu AS
$$import os
os.system("/usr/bin/php /home/laurenz/hello.php '" + TD["new"]["val"] + "'")$$;

CREATE TABLE test (id integer PRIMARY KEY, val text);

CREATE TRIGGER pytrig AFTER INSERT ON test FOR EACH ROW
   EXECUTE PROCEDURE pytrig();

0 个答案:

没有答案