You can create a role that provides read-only access to your database.
Adding a read-only user role to your database does not provide resource isolation. If you want to restrict the access of a read-only user, as well as isolate resources, you can create a read replica instead. For more information, see the read scaling section.
You can create a read-only user to provide limited access to your database.
Connect to your database as the
At the psql prompt, create the new role:
Grant the appropriate permissions for the role, as required. For example, to grant
SELECTpermissions to a specific table, use:
SELECTpermissions to all tables in a specific schema, use:
Create a new user:
Assign the role to the new user:
Found an issue on this page?Report an issue!