在postgres 9.2中,我试图创建一个可以作为触发器的python程序.我想运行一个外部程序(本地磁盘上的一个exe),所以我使用python来运行它.当我try 创建这样一个简单的程序时:
CREATE FUNCTION one ()
RETURNS int
AS $$
# PL/Python function body
$$ LANGUAGE plpythonu;
我得到了一个错误:
ERROR: language "plpythonu" does not exist
HINT: Use CREATE LANGUAGE to load the language into the database.
当我 run 时:
CREATE LANGUAGE plpythonu
我得到了一个错误:
ERROR: could not access file "$libdir/plpython2": No such file or directory
我正在使用Windows 7和python 2.5.
我看了很多地方,但找不到解决办法.
有什么 idea 吗?