CREATE USER — define a new database role
CREATE USERname
[ [ WITH ]option
[ ... ] ] whereoption
can be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE | NOCREATEROLE | CREATEUSER | NOCREATEUSER | INHERIT | NOINHERIT | LOGIN | NOLOGIN | CONNECTION LIMITconnlimit
| [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password
' | VALID UNTIL 'timestamp
' | IN ROLErolename
[, ...] | IN GROUProlename
[, ...] | ROLErolename
[, ...] | ADMINrolename
[, ...] | USERrolename
[, ...] | SYSIDuid
CREATE USER
is now an alias for
CREATE ROLE,
which see for more information.
The only difference is that when the command is spelled
CREATE USER
, LOGIN
is assumed
by default, whereas NOLOGIN
is assumed when
the command is spelled
CREATE ROLE
.