©
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
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 role_name [, ...]
| IN GROUP role_name [, ...]
| ROLE role_name [, ...]
| ADMIN role_name [, ...]
| USER role_name [, ...]
| SYSID uid
CREATE USER现在是CREATE ROLE的别名, 唯一的区别是CREATE USER命令缺省假设有LOGIN, 而 CREATE ROLE缺省是NOLOGIN。
CREATE USER语句是PostgreSQL扩展。 SQL标准把用户的定义交给了实现来完成。