Add examples for database permissions

Last time I added a new DB I was struggling with the way to set permission to DB
user. Examples could be helpful in this case, so let's add them.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
Michal Konecny 2024-07-08 14:37:51 +02:00 committed by kevin
parent 4ffd68f280
commit 10fadffa5a

View file

@ -83,8 +83,10 @@ NEWDB=# revoke all on database NEWDB from public;
NEWDB=# revoke all on schema public from public;
NEWDB=# grant all on schema public to NEWDBadmin;
NEWDB=# [grant permissions to NEWDBapp as appropriate for your app]
# Example: grant select, insert, update, delete on schema public to NEWDBapp;
NEWDB=# [grant permissions to NEWDBreadonly as appropriate for a user that
is only trusted enough to read information]
# Example: grant select on schema public to NEWDBreadonly;
NEWDB=# grant connect on database NEWDB to nagiosuser;
....