ALTER USER — change a database role
ALTER USERrole_specification[ WITH ]option[ ... ] whereoptioncan be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE | NOCREATEROLE | INHERIT | NOINHERIT | LOGIN | NOLOGIN | REPLICATION | NOREPLICATION | BYPASSRLS | NOBYPASSRLS | CONNECTION LIMITconnlimit| [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL | VALID UNTIL 'timestamp' ALTER USERnameRENAME TOnew_nameALTER USER {role_specification| ALL } [ IN DATABASEdatabase_name] SETconfiguration_parameter{ TO | = } {value| DEFAULT } ALTER USER {role_specification| ALL } [ IN DATABASEdatabase_name] SETconfiguration_parameterFROM CURRENT ALTER USER {role_specification| ALL } [ IN DATABASEdatabase_name] RESETconfiguration_parameterALTER USER {role_specification| ALL } [ IN DATABASEdatabase_name] RESET ALL whererole_specificationcan be:role_name| CURRENT_ROLE | CURRENT_USER | SESSION_USER
ALTER USER is now an alias for ALTER ROLE.
The ALTER USER statement is a PostgreSQL extension. The SQL standard leaves the definition of users to the implementation.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.