mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-15 06:12:59 +00:00
12 lines
234 B
Plaintext
12 lines
234 B
Plaintext
-- List roles
|
|
SELECT rolname FROM pg_roles;
|
|
|
|
-- Create user
|
|
CREATE USER <user_name> WITH PASSWORD '<password>';
|
|
|
|
-- Drop user
|
|
DROP USER IF EXISTS <user_name>;
|
|
|
|
-- Alter user password
|
|
ALTER ROLE <user_name> WITH PASSWORD '<password>';
|