创建postgresql的存储过程

创建postgresql的存储过程时,需要指定语言,比如:language 'plpgsql'; 或者language 'sql';
当指定语言为“plpgsql”时,发生错误:
ERROR: language "plpgsql" does not exist
HINT: Use CREATE LANGUAGE to load the language into the database.
解决方法:
createlang -U [USER] plpgsql [DB NAME];
特别需要注意的是,上面这行命令是需要在SHELL中执行的,而不是在SQL中!

猜你喜欢

转载自winds-he.iteye.com/blog/1926213