Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
postgresql: Correcting casing in queries
Browse files Browse the repository at this point in the history
Queries don't have to be strictly uppercase. In order to be consistent
with doc team standards, making the variables capitalized.
  • Loading branch information
richard-joerger-aiven committed Dec 26, 2023
1 parent ee37f6b commit 77fada8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/products/postgresql/howto/readonly-user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ Set read-only access in a schema

.. code-block:: bash
ALTER DEFAULT PRIVILEGES FOR ROLE NAME_OF_ROLE IN SCHEMA NAME_OF_SCHEMA abbreviated_grant_or_revoke
alter default privileges for role name_of_role in schema name_of_schema YOUR_GRANT_OR_REVOKE_PERMISSIONS
2. Apply the new read-only access setting to your existing database objects that uses the affected schema.
.. code-block:: bash
GRANT SELECT ON ALL TABLES IN SCHEMA NAME_OF_SCHEMA to NAME_OF_READ_ONLY_ROLE
grant select on all tables in schema name_of_schema to NAME_OF_READ_ONLY_ROLE
Set read-only access in a database
----------------------------------
You can set up the read-only access for a specific user's role in a particular database.
1. Create a new database which will be used as a template ``CREATE DATABASE ro_<name>_template...``
1. Create a new database which will be used as a template ``create database ro_<name>_template...``
2. For the new template database, set permissions and roles that you want as default ones in the template.
3. When creating a new database, use ``CREATE DATABASE <name> WITH TEMPLATE = 'ro_<name>_template'``
3. When creating a new database, use ``create database NAME with template = 'ro_<name>_template'``

0 comments on commit 77fada8

Please sign in to comment.