# CREATE_USER - man(7) - [phpMan]

_CREATE_ [_USER_(7)](https://www.chedong.com/phpMan.php/man/USER/7/markdown)                     PostgreSQL 16.14 Documentation                     _CREATE_ [_USER_(7)](https://www.chedong.com/phpMan.php/man/USER/7/markdown)

## NAME
       CREATE_USER - define a new database role

## SYNOPSIS
       CREATE USER _name_ [ [ WITH ] _option_ [ ... ] ]

       where _option_ can be:

             SUPERUSER | NOSUPERUSER
           | CREATEDB | NOCREATEDB
           | CREATEROLE | NOCREATEROLE
           | INHERIT | NOINHERIT
           | LOGIN | NOLOGIN
           | REPLICATION | NOREPLICATION
           | BYPASSRLS | NOBYPASSRLS
           | CONNECTION LIMIT _connlimit_
           | [ ENCRYPTED ] PASSWORD '_password_' | PASSWORD NULL
           | VALID UNTIL '_timestamp_'
           | IN ROLE _role_name_ [, ...]
           | IN GROUP _role_name_ [, ...]
           | ROLE _role_name_ [, ...]
           | ADMIN _role_name_ [, ...]
           | USER _role_name_ [, ...]
           | SYSID _uid_

## DESCRIPTION
       **CREATE USER **is now an alias for **CREATE ROLE**. 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**.

## COMPATIBILITY
       The **CREATE USER **statement is a PostgreSQL extension. The SQL standard leaves the definition
       of users to the implementation.

## SEE ALSO
       CREATE ROLE ([**CREATE_ROLE**(7)](https://www.chedong.com/phpMan.php/man/CREATEROLE/7/markdown))

PostgreSQL 16.14                                2026                                  _CREATE_ [_USER_(7)](https://www.chedong.com/phpMan.php/man/USER/7/markdown)
