CREATE USER — define a new database role
name[ [ WITH ]
option[ ... ] ] where
optioncan be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE | NOCREATEROLE | INHERIT | NOINHERIT | LOGIN | NOLOGIN | REPLICATION | NOREPLICATION | BYPASSRLS | NOBYPASSRLS | CONNECTION LIMIT
connlimit| [ ENCRYPTED ] PASSWORD '
password' | VALID UNTIL '
timestamp' | IN ROLE
role_name[, ...] | IN GROUP
role_name[, ...] | ROLE
role_name[, ...] | ADMIN
role_name[, ...] | USER
role_name[, ...] | SYSID
CREATE USER is now an alias for
ROLE. The only difference is that when the command
LOGIN is assumed by default,
NOLOGIN is assumed when
the command is spelled
CREATE USER statement is a
PostgreSQL extension. The SQL
standard leaves the definition of users to the
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.