PostgreSQL, how can i restrict access to code in a function for a user?

余生长醉 提交于 2019-12-10 19:25:50

问题


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?

I was trying this:

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.

What have i missed?


回答1:


REVOKE access to the system view pg_proc or at least the column prosrc that hase the source code for the function.



来源:https://stackoverflow.com/questions/3651720/postgresql-how-can-i-restrict-access-to-code-in-a-function-for-a-user

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