t
Title: CREATE USER
Author: The PostgreSQL Global Development Group
Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
Date: 2021
Manual: PostgreSQL 11.14 Documentation
Source: PostgreSQL 11.14
Language: English

"CREATE USER" "7" "2021" "PostgreSQL 11.14" "PostgreSQL 11.14 Documentation"
-----------------------------------------------------------------
* Define some portability stuff
-----------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://bugs.debian.org/507673
http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------
* set default formatting
-----------------------------------------------------------------
disable hyphenation
disable justification (adjust text to left margin only)
-----------------------------------------------------------------
* MAIN CONTENT STARTS HERE *
-----------------------------------------------------------------
"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 \*(Aqpassword\*(Aq | PASSWORD NULL
 | VALID UNTIL \*(Aqtimestamp\*(Aq
 | 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 (CREATE_ROLE(7)). 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))