Re: Roles and security - Mailing list pgsql-jobs

From Laurenz Albe
Subject Re: Roles and security
Date
Msg-id 1511709533.2396.5.camel@cybertec.at
Whole thread Raw
In response to Roles and security  (nikhil raj <nikhilraj474@gmail.com>)
List pgsql-jobs
nikhil raj wrote:
> Currently my company is shifting from MS SQL to postgres
> 
>  check the roles of user I want to give user roles only select, insert, update, execute and create database to all
usersPermission
 
> 
> 
> The users should not have these permission
>  drop database , delete table permission

If you want to allow a user (or role) CREATE DATABASE, give them the
CREATEDB privilege with ALTER ROLE.

If you mean "schema" when you say "database", give them the CREATE
privilege on the database instead.

SELECT, INSERT, UPDATE and EXECUTE are granted on individual objects,
not in general.

You can, however, use ALTER DEFUALT PRIVILEGES to automatically grant
privieges on any new object created.

Note that by default, everybody (the special role PUBLIC) has EXECUTE
privilege on all functions.

Only superusers and object owners are allowed DROP and ALTER on objects,
and there is no way to prevent that.

Yours,
Laurenz Albe


pgsql-jobs by date:

Previous
From: nikhil raj
Date:
Subject: Roles and security
Next
From: "Chris Keady"
Date:
Subject: Senior Postgresql Developer in Columbia, MD