For a production system, you can use this configuration :
--ACCESS DBREVOKECONNECTON DATABASE nova FROM PUBLIC;
GRANTCONNECTON DATABASE nova TOuser;
--ACCESS SCHEMAREVOKEALLON SCHEMA public FROM PUBLIC;
GRANT USAGE ON SCHEMA public TOuser;
--ACCESS TABLESREVOKEALLONALL TABLES IN SCHEMA public FROM PUBLIC ;
GRANTSELECTONALL TABLES IN SCHEMA public TO read_only ;
GRANTSELECT, INSERT, UPDATE, DELETEONALL TABLES IN SCHEMA public TO read_write ;
GRANTALLONALL TABLES IN SCHEMA public TO admin ;
There are are some people who use my database and I want to prevent them to read code of tables and funtions. I have created a schema in which only postgres user can have access. Other users can not use objects in this but they can list all sql code for each object if they use pgadmin. What is the command to prevent users to list objects and prevent them to read the sql code.