From 77fada87a03526cc39de571678a4ab2fef7d646c Mon Sep 17 00:00:00 2001 From: Richard Joerger Date: Tue, 26 Dec 2023 13:53:31 -0500 Subject: [PATCH] postgresql: Correcting casing in queries Queries don't have to be strictly uppercase. In order to be consistent with doc team standards, making the variables capitalized. --- docs/products/postgresql/howto/readonly-user.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/products/postgresql/howto/readonly-user.rst b/docs/products/postgresql/howto/readonly-user.rst index eeea027dc1..d426eca9d0 100644 --- a/docs/products/postgresql/howto/readonly-user.rst +++ b/docs/products/postgresql/howto/readonly-user.rst @@ -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__template...`` +1. Create a new database which will be used as a template ``create database ro__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 WITH TEMPLATE = 'ro__template'`` +3. When creating a new database, use ``create database NAME with template = 'ro__template'``