CREATE USER
现在是CREATE ROLE的一个别名。
简介
CREATE USER
现在是CREATE ROLE的一个别名。唯一的区别是 CREATE USER
中LOGIN
被作为默认值,而NOLOGIN
是 CREATE ROLE
的默认值。
语法
CREATE USER name [ [ WITH ] option [ ... ] ]
这里 option 可以是:
SUPERUSER | NOSUPERUSER
| CREATEDB | NOCREATEDB
| CREATEROLE | NOCREATEROLE
| INHERIT | NOINHERIT
| LOGIN | NOLOGIN
| REPLICATION | NOREPLICATION
| BYPASSRLS | NOBYPASSRLS
| CONNECTION LIMIT connlimit
| [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL
| VALID UNTIL 'timestamp'
| IN ROLE role_name [, ...]
| IN GROUP role_name [, ...]
| ROLE role_name [, ...]
| ADMIN role_name [, ...]
| USER role_name [, ...]
| SYSID uid
文档内容是否对您有帮助?