PostgreSQL User(Role)
User
User 생성
CREATE USER <user> WITH PASSWORD '<password>'
CREATE USER
는 CREATE ROLE ... LOGIN
과 동일한 것으로 간주하면 됩니다.
User 암호 변경
ALTER USER <user> WITH PASSWORD '<password>'
CREATE ROLE
- https://www.postgresql.org/docs/current/sql-createrole.html
- https://www.postgresql.org/docs/current/role-attributes.html
CREATE ROLE <role> [WITH <option> ...]
SELECT
\du [<pattern>]
GRANT
GRANT <role>
TO <user | role>