ERROR: language "C" does not existSTATEMENT: CREATE EXTENSION plr;ERROR: language "C" does not exist
当我使用select * from pg_language列出数据库中的可用语言时;我明白了
lanname | laNowner | lanispl | lanpltrusted | lanplcallfoID | laninline | lanvalIDator | lanacl ----------+----------+---------+--------------+---------------+-----------+--------------+-------- internal | 10 | f | f | 0 | 0 | 2246 | c | 10 | f | f | 0 | 0 | 2247 | sql | 10 | f | t | 0 | 0 | 2248 | plpgsql | 10 | t | t | 12514 | 12515 | 12516 | (4 rows)
所以有一种语言c但它不是大写字母(不确定这是否有所不同).
我想知道为什么plr扩展名没有找到C程序语言?
您可能在Postgresql 9.2(引用 release notes here)中遇到此更改:No longer forcibly lowercase procedural language names in CREATE
FUNCTION (Robert Haas)While unquoted language IDentifIErs are still lowercased,strings and
quoted IDentifIErs are no longer forcibly down-cased. Thus for example
CREATE FUNCTION … LANGUAGE ‘C’ will no longer work; it must be
spelled ‘c’,or better omit the quotes.
它也反映在manual for CREATE FUNCTION
lang_name
The name of the language that the function is implemented in. Can be
sql@H_502_34@,
C@H_502_34@,
internal@H_502_34@,or the name of a user-defined procedural
language. For backward compatibility,the name can be enclosed by
single quotes.
至少从版本7.3(可能更长)开始,不鼓励引用语言名称,但显然老习惯很难.删除’C’周围的引号可以解决问题,到达:LANGUAGE c或LANGUAGE C.
从project page开始,PL / R在这方面还没有为Postgresql 9.2做好准备.
从反馈Joe Conway
Joe Conway留下了一个被删除的答案,因为它应该是一个评论.我将它粘贴到一般公众身上,无法看到已删除的答案:
总结I got the message,just haven’t had the time to do a new PL/R release. Look for it by December,but in the meantime the manual workaround noted above is pretty simple.
以上是内存溢出为你收集整理的PostgreSQL程序语言“C”未找到全部内容,希望文章能够帮你解决PostgreSQL程序语言“C”未找到所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)