Postgres-# GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess postgres-# GRANT USAGE ON SCHEMA public TO readaccess You can change schema name as per your requirement. postgres-# GRANT CONNECT ON DATABASE mydb TO readaccess įurther we will grant access to all tables in public schema. You can change database name as per your requirement. Run the following commands to assign access to newly created role, for database mydb. postgres-# CREATE ROLE readaccess Īlso read : How to Compare Two Schemas in PostgreSQL Replace role name as per your requirement. Log into PostgreSQL and run the following command to a create read only role readaccess. Here are the steps to create read only user in PostgreSQL. In this article, we will look at how to create read only user in PostgreSQL. Read only users are very useful for reporting purposes since they have limited read only access to databases, tables and fields.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |