DBA Hub

📋Steps in this guide1/1

Create/drop role in postgres

- Create role :

postgresql configurationintermediate
by PostgreSQL
12 views
1

Create/drop role in postgres

- Create role :

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dbaclass=#
create role dev_admin;
CREATE ROLE
dbaclass=#
create role dev_admin with valid until '10-oct-2020';
CREATE ROLE
-- role with createdb and superuser privilege and login keyword mean it can login to db like a normal user
dbaclass=#
create role dev_admin with createdb createrole login ;
CREATE ROLE
DROP ROLE:
dbaclass=#
drop role dev_admin;
DROP ROLE
select rolname,rolcanlogin,rolvaliduntil from pg_roles;

Comments (0)

Please to add comments

No comments yet. Be the first to comment!