ALTER USER — 更改一个数据库角色
ALTER USERrole_specification
[ WITH ]option
[ ... ] 其中option
可以是: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE | NOCREATEROLE | INHERIT | NOINHERIT | LOGIN | NOLOGIN | REPLICATION | NOREPLICATION | BYPASSRLS | NOBYPASSRLS | CONNECTION LIMITconnlimit
| [ ENCRYPTED ] PASSWORD 'password
' | VALID UNTIL 'timestamp
' ALTER USERname
RENAME TOnew_name
ALTER USER {role_specification
| ALL } [ IN DATABASEdatabase_name
] SETconfiguration_parameter
{ TO | = } {value
| DEFAULT } ALTER USER {role_specification
| ALL } [ IN DATABASEdatabase_name
] SETconfiguration_parameter
FROM CURRENT ALTER USER {role_specification
| ALL } [ IN DATABASEdatabase_name
] RESETconfiguration_parameter
ALTER USER {role_specification
| ALL } [ IN DATABASEdatabase_name
] RESET ALL 其中role_specification
可以是:role_name
| CURRENT_USER | SESSION_USER
ALTER USER
现在是
ALTER ROLE的一种别名。
ALTER USER
语句是一种
PostgreSQL扩展。SQL 标准把用户的定义留给
实现来处理。