CREATE USER name [ [ WITH ] option [ ... ] ] 这里 option 可以是: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE | NOCREATEROLE | CREATEUSER | NOCREATEUSER | INHERIT | NOINHERIT | LOGIN | NOLOGIN | CONNECTION LIMIT connlimit | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password' | VALID UNTIL 'timestamp' | IN ROLE rolename [, ...] | IN GROUP rolename [, ...] | ROLE rolename [, ...] | ADMIN rolename [, ...] | USER rolename [, ...] | SYSID uid
CREATE USER 现在是 CREATE ROLE 的别名,参阅之获取更多信息。唯一的区别是如果把一道命令拼做 CREATE USER, 那么缺省假设有 LOGIN,而写做 CREATE ROLE 的时候,缺省是 NOLOGIN。