# phpman > man > CREATE_USER(7)

CREATE [USER(7)](https://www.chedong.com/phpMan.php/man/USER/7/markdown)                     PostgreSQL 14.23 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/ROLE/7/markdown))



PostgreSQL 14.23                                2026                                  CREATE [USER(7)](https://www.chedong.com/phpMan.php/man/USER/7/markdown)
