ALTER USER

Changes the definition of a database role (user).

Synopsis

  1. ALTER USER <name> RENAME TO <newname>
  2. ALTER USER <name> SET <config_parameter> {TO | =} {<value> | DEFAULT}
  3. ALTER USER <name> RESET <config_parameter>
  4. ALTER USER <name> [ [WITH] <option> [ ... ] ]

where <option> can be:

  1. SUPERUSER | NOSUPERUSER
  2. | CREATEDB | NOCREATEDB
  3. | CREATEROLE | NOCREATEROLE
  4. | CREATEUSER | NOCREATEUSER
  5. | INHERIT | NOINHERIT
  6. | LOGIN | NOLOGIN
  7. | [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<password>'
  8. | VALID UNTIL '<timestamp>'

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.

Compatibility

The ALTER USER statement is a HAWQ extension. The SQL standard leaves the definition of users to the implementation.

See Also

ALTER ROLE