CREATE_USER(7pg14)

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

πŸ’– NAME πŸ’–

okay so this is the CREATE USER(7) manual page from the PostgreSQL 14.24 documentation, bestie 🫢 and the NAME line is literally CREATE_USER β€” define a new database role. that's the whole assignment: new role, new character, iconic behavior only βœ¨πŸ’…

🌸 SYNOPSIS 🌸

here's the exact shape of it, no cap:

       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's the full option menu right there β€” every single one, iykyk πŸ’œ

πŸ’… DESCRIPTION πŸ’…

okay so the tea is: 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. periodt, that's it, that's the distinction πŸ’–βœ¨

πŸ¦‹ COMPATIBILITY πŸ¦‹

fr fr, the CREATE USER statement is a PostgreSQL extension. the SQL standard leaves the definition of users to the implementation. so yeah, standard SQL is not defining this for you β€” it's giving "implementation, you handle it" πŸ’€πŸ¦‹

πŸŽ€ SEE ALSO πŸŽ€

  • CREATE ROLE (CREATE_ROLE(7)) β€” the main character this page keeps referencing, go read it bestie πŸ«ΆπŸ‘‘

and that's the page! πŸŽ€πŸ’– this was CREATE USER(7) from PostgreSQL 14.24, dated 2026 β€” mwah, bye bestie πŸ’‹βœ¨

πŸ“¦ where this page comes from