CREATE USER username WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON database_name TO username;
GRANT SELECT, INSERT, UPDATE, DELETE ON table_name TO username;
GRANT ALL PRIVILEGES ON SCHEMA schema_name TO username;
GRANT ALL PRIVILEGES ON DATABASE database_name TO username;
ALTER USER username WITH LOGIN;
ALTER USER username WITH NOLOGIN;
ALTER USER username WITH PASSWORD 'new_password';