serverapps:db:postgresql:command
差分
このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
serverapps:postgresql:command [2019/02/11 04:38] – 作成 hayashi | serverapps:db:postgresql:command [2021/05/11 02:30] (現在) – ↷ serverapps:postgresql:command から serverapps:db:postgresql:command へページを移動しました。 hayashi | ||
---|---|---|---|
行 16: | 行 16: | ||
テーブル構造の表示 | テーブル構造の表示 | ||
\d テーブル名; | \d テーブル名; | ||
+ | |||
+ | ===== ユーザー権限 ===== | ||
+ | |||
+ | 現在のユーザー(Role)を表示 | ||
+ | select current_user; | ||
+ | |||
+ | ユーザー(Role)の一覧を表示 | ||
+ | \du | ||
+ | | ||
+ | ユーザー情報一覧を表示 | ||
+ | select * from pg_user; | ||
+ | |||
+ | ユーザー (Role)に権限を付与 | ||
+ | grant select, insert, update, delete on < | ||
+ | |||
+ | ユーザー (Role)に権限を剥奪 | ||
+ | revoke select, insert, update, delete on < | ||
+ | |||
+ | ユーザーの切り替え | ||
+ | \connect - < | ||
+ | |||
+ | スーパーユーザーへ変更 | ||
+ | alter role < | ||
+ | |||
+ | スーパーユーザー権限剥奪 | ||
+ | alter role < | ||
+ | |||
+ |
serverapps/db/postgresql/command.1549859937.txt.gz · 最終更新: 2019/02/11 04:38 by hayashi