PostgreSQL 13 ロールのパスワードをなしに設定するサンプル

環境
Windows 10 Home 64bit
PostgreSQL 13.2

書式
ALTER ROLE ユーザー名 with PASSWORD NULL
パスワードをなしに設定します。

使用例
「test01」というロールのパスワードをなしに設定します。
SQL構文

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alter role test01 with password null;
alter role test01 with password null;
alter role test01 with password null;

実行結果

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
postgres=# alter role test01 with password null;
ALTER ROLE
postgres=# alter role test01 with password null; ALTER ROLE
postgres=# alter role test01 with password null;
ALTER ROLE

 

PostgreSQL

Posted by arkgame