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 。