「PostgreSQL」ロール(role)を追加する方法
環境
Windows 10 home 64bit
Postgresql 9.6.5
使用例
1.現在のロール一覧を確認します
postgres=# select rolname from pg_roles;
rolname
-------------------
pg_signal_backend
postgres
cft055
postgres=# select rolname from pg_roles;
rolname
-------------------
pg_signal_backend
postgres
cft055
postgres=# select rolname from pg_roles; rolname ------------------- pg_signal_backend postgres cft055
2.ロールを追加します
postgres=# create role arkgame;
CREATE ROLE
postgres=# create role arkgame;
CREATE ROLE
postgres=# create role arkgame; CREATE ROLE
3.ロール追加後確認
postgres=# select rolname from pg_roles;
rolname
-------------------
pg_signal_backend
postgres
cft055
arkgame
postgres=# select rolname from pg_roles;
rolname
-------------------
pg_signal_backend
postgres
cft055
arkgame
postgres=# select rolname from pg_roles; rolname ------------------- pg_signal_backend postgres cft055 arkgame