目錄
createuser 命令
$ createuser -P wechat Enter password for new role: Enter it again:
新建用戶 SQL
CREATE ROLE woodart LOGIN PASSWORD 'chen' NOINHERIT VALID UNTIL 'infinity';
CREATE ROLE dba LOGIN PASSWORD 'your password' SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION;
本地操作
$ dropuser dba
遠程操作
dropuser -h192.168.1.1 -p 5432 -i -e testuser User "testuser" and any owned databases will be permanently deleted. Are you sure? (y/n) y
CREATE ROLE sender LOGIN ENCRYPTED PASSWORD 'md51fd19061f37b296d27bf52b4c32c12ad' VALID UNTIL 'infinity' CONNECTION LIMIT 2048;
CREATE ROLE sender LOGIN ENCRYPTED PASSWORD 'md51fd19061f37b296d27bf52b4c32c12ad' REPLICATION VALID UNTIL 'infinity' CONNECTION LIMIT 2048;