云数据库 GAUSSDB-ALTER ROLE:语法格式

时间:2024-11-02 18:50:32

语法格式

  • 修改角色的权限。
    ALTER ROLE role_name [ [ WITH ] option [ ... ] ];

    其中权限项子句option为。

    {CREATEDB | NOCREATEDB}
        | {CREATEROLE | NOCREATEROLE}
        | {INHERIT | NOINHERIT}
        | {AUDITADMIN | NOAUDITADMIN}
        | {SYSADMIN | NOSYSADMIN}
        | {MONADMIN | NOMONADMIN}
        | {OPRADMIN | NOOPRADMIN}
        | {POLADMIN | NOPOLADMIN}
        | {USEFT | NOUSEFT}
        | { LOG IN | NOLOGIN}
        | {REPLICATION | NOREPLICATION}
        | {VCADMIN | NOVCADMIN}
        | {PERSISTENCE | NOPERSISTENCE}
        | CONNECTION LIMIT connlimit
        | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password' [EXPIRED]
        | [ ENCRYPTED | UNENCRYPTED ] IDENTIFIED BY 'password' [ REPLACE 'old_password' | EXPIRED ]
        | [ ENCRYPTED | UNENCRYPTED ] PASSWORD { 'password' | DISABLE | EXPIRED }
        | [ ENCRYPTED | UNENCRYPTED ] IDENTIFIED BY { 'password' [ REPLACE 'old_password' ] | DISABLE }
        | VALID BEGIN 'timestamp'
        | VALID UNTIL 'timestamp'
        | RESOURCE POOL 'respool'
        | PERM SPACE 'spacelimit'
        | PGUSER
  • 修改角色的名称。
    ALTER ROLE role_name 
        RENAME TO new_name;
  • 锁定或解锁。
    ALTER ROLE role_name 
        ACCOUNT { LOCK | UNLOCK };
  • 设置角色的配置参数。
    ALTER ROLE role_name [ IN DATABASE database_name ]
        SET configuration_parameter {{ TO | = } { value | DEFAULT } | FROM CURRENT};
  • 重置角色的配置参数。
    ALTER ROLE role_name
        [ IN DATABASE database_name ] RESET {configuration_parameter|ALL};
support.huaweicloud.com/centralized-devg-v3-gaussdb/gaussdb-12-0477.html