3

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 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

3 Comments

i'm using here: REVOKE ALL PRIVILEGES ON TABLE pg_catalog.pg_proc FROM user; But it's not working... the user still can see the table.
Did you also REVOKE public access? Your user is also "public": REVOKE SELECT ON TABLE pg_proc FROM public;
can i revoke only a specific function ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.