CREATE_USER(7pg17)

πŸ“¦ version 17.11, in opensuse-leap 16.0

πŸ’– 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 πŸ‘‘


later bestie β€” this little masterpiece is from PostgreSQL 17.11, dated 2026. πŸ’–βœ¨

πŸ“¦ where this page comes from