CREATE_USER(7pg17)
π NAME π
okay bestie, welcome to CREATE USER(7pg17) β the manual page for defining a brand-new database role. Itβs giving βmake a whole new identityβ energy, and yes, that is the manual name folded in right at the top. π
CREATE_USERβ define a new database role
β¨ SYNOPSIS β¨
No cap, hereβs the exact shape of the thing:
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
That whole menu is the synopsis, bestie β every line is an option spelling you can use in your CREATE USER call. Iconic little grammar moment. π
πΈ DESCRIPTION πΈ
CREATE USER is now an alias for CREATE ROLE. The only difference is this: when the command is spelled CREATE USER, LOGIN is assumed by default. When itβs spelled CREATE ROLE, NOLOGIN is assumed by default. Thatβs the whole plot twist. π¦
π COMPATIBILITY π
The CREATE USER statement is a PostgreSQL extension. Not a SQL-standard-core moment, iykyk. The SQL standard leaves the definition of users to the implementation.
π SEE ALSO π
CREATE ROLE(CREATE_ROLE(7))
later bestie β this little masterpiece is from PostgreSQL 17.11, dated 2026. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms