PostgreSQL - sql commands - GRANT - Give a role to a user
Grant permission in PostgreSQL
In this article, we will see how to grant a role to a user in PostgreSQL.
GRANT gives privileges on a database object (table, column, view, foreign table, sequence, database, foreign-data wrapper, foreign server, function, procedure, procedural language, schema, or tablespace eetc.), and can give membership in a role.
Lets see how to use GRANT to assign a role to a user in PostgreSQL.
GRANT roleName TO userName;
Lets see Using grant and give all permission in PostgreSQL example .
In above example, we created a role with name "role1_readers", and gave to user account "daniel".
Data Layers
Area: | programming \ opensource \ postgresql \ \ \ |
Ref: | |
Loc: | |
Tags: | |
|