PostgreSQL,我如何限制用户对函数中代码的访问? [英] PostgreSQL, how can i restrict access to code in a function for a user?
本文介绍了PostgreSQL,我如何限制用户对函数中代码的访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我发现了如何拒绝模式中用户对表的所有访问。
I found out how to deny all access to tables for user in a schema.
REVOKE ALL PRIVILEGES ON SCHEMA test FROM user;
但是我该怎么做才能限制对模式中所有功能的访问,从而使用户无法
But what can i do to restrict access to all functions in a schema, so that user couldn't read the code?
我正在尝试:
REVOKE ALL ON FUNCTION test.test_function(text) FROM user;
是的,它限制了更改功能的能力,但并未实际看到它。
Yes, it has restricted the ability to change a function, but not to actually see it.
我错过了什么?
推荐答案
撤销对系统视图的访问< a href = http://www.postgresql.org/docs/current/interactive/catalog-pg-proc.html rel = nofollow noreferrer> pg_proc 或至少列 prosrc 具有该功能的源代码。
REVOKE access to the system view pg_proc or at least the column prosrc that hase the source code for the function.
这篇关于PostgreSQL,我如何限制用户对函数中代码的访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文