| --- |
| title: ALTER USER |
| --- |
| |
| Changes the definition of a database role (user). |
| |
| ## <a id="alteruser__section2"></a>Synopsis |
| |
| ``` pre |
| ALTER USER <name> RENAME TO <newname> |
| |
| ALTER USER <name> SET <config_parameter> {TO | =} {<value> | DEFAULT} |
| |
| ALTER USER <name> RESET <config_parameter> |
| |
| ALTER USER <name> [ [WITH] <option> [ ... ] ] |
| ``` |
| |
| where \<option\> can be: |
| |
| ``` pre |
| SUPERUSER | NOSUPERUSER |
| | CREATEDB | NOCREATEDB |
| | CREATEROLE | NOCREATEROLE |
| | CREATEUSER | NOCREATEUSER |
| | INHERIT | NOINHERIT |
| | LOGIN | NOLOGIN |
| | [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<password>' |
| | VALID UNTIL '<timestamp>' |
| ``` |
| |
| ## <a id="alteruser__section3"></a>Description |
| |
| `ALTER USER` is a deprecated command but is still accepted for historical reasons. It is an alias for `ALTER ROLE`. See `ALTER ROLE` for more information. |
| |
| ## <a id="alteruser__section4"></a>Compatibility |
| |
| The `ALTER USER` statement is a HAWQ extension. The SQL standard leaves the definition of users to the implementation. |
| |
| ## <a id="see"></a>See Also |
| |
| [ALTER ROLE](ALTER-ROLE.html) |
| |
| |