ALTER USER

Name

ALTER USER -- 修改一个数据库角色。

Synopsis

ALTER USER _name_ [ [ WITH ] _option_ [ ... ] ]

where `_option_` can be:

      SUPERUSER | NOSUPERUSER
    | CREATEDB | NOCREATEDB
    | CREATEROLE | NOCREATEROLE
    | CREATEUSER | NOCREATEUSER
    | INHERIT | NOINHERIT
    | LOGIN | NOLOGIN
    | REPLICATION | NOREPLICATION
    | CONNECTION LIMIT _connlimit_
    | [ ENCRYPTED | UNENCRYPTED ] PASSWORD '_password_'
    | VALID UNTIL '_timestamp_'

ALTER USER _name_ RENAME TO _new_name_

ALTER USER _name_ SET _configuration_parameter_ { TO | = } { _value_ | DEFAULT }
ALTER USER _name_ SET _configuration_parameter_ FROM CURRENT
ALTER USER _name_ RESET _configuration_parameter_
ALTER USER _name_ RESET ALL

描述

ALTER USER现在是ALTER ROLE命令的别名(即两者相同)。

兼容性

ALTER USER是PostgreSQL的扩展,SQL标准中还没有完成用户定义相关的语法。

参见

ALTER ROLE