ALTER_USER(7pg14)
okay bestie, welcome to ALTER USER(7) from the PostgreSQL 14.24 Documentation β it's the page for changing a database role, and it's short, iconic, and lowkey just sends you over to ALTER ROLE. π
β¨
π NAME π
ALTER_USER β change a database role. That's the whole vibe. π
β¨ SYNOPSIS β¨
okay so here's the exact syntax, bestie β do not improvise, this is not a freestyle verse:
ALTER USER role_specification [ 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'
ALTER USER name RENAME TO new_name
ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] SET configuration_parameter { TO | = } { value | DEFAULT }
ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] SET configuration_parameter FROM CURRENT
ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] RESET configuration_parameter
ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] RESET ALL
where role_specification can be:
role_name
| CURRENT_ROLE
| CURRENT_USER
| SESSION_USER
π DESCRIPTION π
okay so the tea is: ALTER USER is now an alias for ALTER ROLE. That's it. That's the description. It's giving βsame person, different nameβ and honestly? Iconic. π
π«Ά
π¦ COMPATIBILITY π¦
The ALTER USER statement is a PostgreSQL extension. The SQL standard leaves the definition of users to the implementation. Periodt. π
π₯ SEE ALSO π₯
ALTER ROLE(ALTER_ROLE(7)) β go read that one too, bestie. π
mwah π this was the ALTER USER(7) page from the PostgreSQL 14.24 Documentation β source/version: PostgreSQL 14.24, date: 2026. bye bestie, slay your roles ππ¦β¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-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