Re: Roles and security

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Roles and security
Date: 2017-11-25 23:15:03
Message-ID: f5ab66e4-da3b-c5fe-7d3f-76096ef34071@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice pgsql-sql

On 11/25/2017 12:03 PM, nikhil raj wrote:
>  check the roles of user I want to give user roles only select,
> insert, update, execute and create database to all users Permission
>

those permissions can be assigned on a table by table basis, except
create database, thats a special permission.    if you own a database
(the creator owns it by default) then you can drop it, if you don't, you
can't.

>
> The users should not have these permission
>  drop database , delete table permission

generally the owners of objects can grant/revoke permissions on said
objects.

>
>
> **(Example --like in MS SQL we have like DB_roles-- ddladmin,data
> writer,data reader ,etc like these do we have in postgres).***

you could create roles like these, make users members of these roles,a
nd grant permissions to the roles.

for more information, see

https://www.postgresql.org/docs/current/static/user-manag.html
https://www.postgresql.org/docs/current/static/sql-grant.html
https://www.postgresql.org/docs/current/static/sql-revoke.html
https://www.postgresql.org/docs/current/static/sql-alterdefaultprivileges.html

--
john r pierce, recycling bits in santa cruz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin Pryzby 2017-11-26 00:53:28 Re: backends stuck in "startup"
Previous Message Tom Lane 2017-11-25 22:45:59 Re: backends stuck in "startup"

Browse pgsql-novice by date

  From Date Subject
Next Message Andreas Kretschmer 2017-11-26 11:27:03 Re: A particular database to move to other drive
Previous Message nikhil raj 2017-11-25 20:13:22 A particular database to move to other drive

Browse pgsql-sql by date

  From Date Subject
Next Message Laurenz Albe 2017-11-26 15:18:53 Re: Roles and security
Previous Message nikhil raj 2017-11-25 20:03:53 Roles and security