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:
parent
4ffd68f280
commit
10fadffa5a
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
....
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue