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> RESOURCE QUEUE {<queue_name> | NONE}
  5. ALTER USER <name> RESOURCE GROUP {<group_name> | NONE}
  6. ALTER USER <name> [ [WITH] <option> [ ... ] ]

where option can be:

  1. SUPERUSER | NOSUPERUSER
  2. | CREATEDB | NOCREATEDB
  3. | CREATEROLE | NOCREATEROLE
  4. | CREATEUSER | NOCREATEUSER
  5. | CREATEEXTTABLE | NOCREATEEXTTABLE
  6. [ ( <attribute>='<value>'[, ...] ) ]
  7. where <attributes> and <value> are:
  8. type='readable'|'writable'
  9. protocol='gpfdist'|'http'
  10. | INHERIT | NOINHERIT
  11. | LOGIN | NOLOGIN
  12. | REPLICATION | NOREPLICATION
  13. | CONNECTION LIMIT <connlimit>
  14. | [ENCRYPTED | UNENCRYPTED] PASSWORD '<password>'
  15. | VALID UNTIL '<timestamp>'
  16. | [ DENY <deny_point> ]
  17. | [ DENY BETWEEN <deny_point> AND <deny_point>]
  18. | [ DROP DENY FOR <deny_point> ]

Description

ALTER USER is an alias for ALTER ROLE. See ALTER ROLE for more information.

Compatibility

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

See Also

ALTER ROLE, CREATE USER, DROP USER

Parent topic: SQL Commands