NOTICE: using pg_pltemplate information instead of CREATE LANGUAGE parameters

纵饮孤独 提交于 2019-12-13 04:44:00

问题


I am getting this error message (shown in title), when I run this SQL statement in PG 8.4:

psql -h localhost -U postgres -d mydb -c "CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler VALIDATOR plpgsql_validator"

What's causing this (it used to work with earlier versions of PG), and how do I resolve it?


回答1:


This procedure has been simplified. For plpgsql simply use:

CREATE LANGUAGE plpgsql;

The error message tells you, that plpgsql is among a number of predefined languages listed in the system table pg_pltemplate. Just have a look:

SELECT * FROM pg_pltemplate;

In PostgreSQL 9.0 and later, PL/pgSQL is pre-installed by default.



来源:https://stackoverflow.com/questions/8680870/notice-using-pg-pltemplate-information-instead-of-create-language-parameters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!