I have a user, who has read access to all the schema. I want to extend his access to create, insert, update and select for only one schema, is there a way.
I tried like
ALTER DEFAULT PRIVILEGES FOR ROLE user_rd IN SCHEMA schema_name
GRANT ALL ON TABLES TO user_rd;
But, not working.
Please help.Thank you
2
Answers
This command only affects future tables created by
user_rd
. You need to use the role that will run theCREATE TABLE
statement instead. And no, there is no command to alter default privileges on tables created by any user.The default works for new tables that you create in the future. For existing tables, you have to use a different command: