Last active
November 12, 2021 13:39
-
-
Save surendra0507/3011278db996d8d8f13446a47bc7c029 to your computer and use it in GitHub Desktop.
Revisions
-
Surendra revised this gist
Nov 12, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,4 +15,4 @@ ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO cents_rd_gro -- Create a final user with password CREATE USER cents_rd WITH PASSWORD 'bhoom'; GRANT cents_rd_group TO cents_rd; -
Surendra created this gist
Nov 12, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ -- -- Read only -- -- Create a group CREATE ROLE cents_rd_group; -- Grant access to existing tables GRANT USAGE ON SCHEMA public TO cents_rd_group; GRANT SELECT ON ALL TABLES IN SCHEMA public TO cents_rd_group; GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO cents_rd_group; -- Grant access to future tables on select ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO cents_rd_group; -- Create a final user with password CREATE USER cents_rd WITH PASSWORD 'bhoom'; GRANT cents_rd_group TO postgres_ro;