ALTER_USER(7pg15)
β¨ ALTER USER β¨ (that's the ALTER_USER page from the PostgreSQL 15.19 docs, bestie π
)
okay so real talk β this one's short and sweet, and the tea is that ALTER USER is literally just ALTER ROLE wearing a different outfit. no cap. but let's get into it anyway π«Ά
π NAME π
ALTER_USER β change a database role
like, it changes a role. that's the whole vibe. πΈ
π¦ SYNOPSIS π¦
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
look at all those options, it's giving menu at a really good restaurant π every single one is there, don't worry, i would never gatekeep π
π₯ DESCRIPTION π₯
okay so the whole entire point: ALTER USER is now an alias for ALTER ROLE. that's it. that's the sentence. slay, iconic, minimal, periodt π
(if you actually wanna know what all those options do, the ALTER ROLE page is your bestie β see SEE ALSO below, i gotchu π«Ά)
π COMPATIBILITY π
so this is the part where we find out it's β¨specialβ¨:
- the
ALTER USERstatement is a PostgreSQL extension β it's not a standard thing, it's our thing π - the SQL standard leaves the definition of users to the implementation, which is honestly such a "figure it out yourself" move of them π
so yeah, don't expect other databases to know what you're talking about. main character PostgreSQL energy only. π¦
π SEE ALSO π
ALTER ROLE(ALTER_ROLE(7)) β the actual one, the blueprint, the original π
ok bestie here's your gentle reminder: this page is genuinely just a redirect in disguise. if you were hoping for a deep lore drop, the ALTER_ROLE(7) page is where the real content lives. no crumbs here, only vibes π
and that's the whole page!! πβ¨π this lil beauty came straight out of the PostgreSQL 15.19 documentation, dated 2026, and it's filed under ALTER USER(7) β mwah, go forth and alter some users, you got this π§ββοΈπ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-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