DBA Hub

📋Steps in this guide1/1

create/drop user in postgres

CREATE USER:

postgresql configurationintermediate
by PostgreSQL
14 views
1

create/drop user in postgres

CREATE USER: CREATE USER WITH VALID UNTIL: CREATE USER WITH SUPER USER PRIVILEGE VIEW USERS: DROP USER:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
dbaclass=#
create user TEST_DBACLASS with password 'test123';
CREATE ROLE
dbaclass=#
create user TEST_dbuser1 with password 'test123' valid until '2020-08-08';
CREATE ROLE
dbaclass=#
create user test_dbuser3 with password 'test123' CREATEDB SUPERUSER;
CREATE ROLE
dbaclass=#
select usename,valuntil,usecreatedb from pg_shadow;
dbaclass=#
select usename,usesuper,valuntil from pg_user;
dbaclass=#
\du+
drop user DB_user1;

Comments (0)

Please to add comments

No comments yet. Be the first to comment!