ALTER USER — 更改数据库角色
ALTER USERrole_specification
[ WITH ]option
[ ... ] whereoption
can be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE | NOCREATEROLE | INHERIT | NOINHERIT | LOGIN | NOLOGIN | REPLICATION | NOREPLICATION | BYPASSRLS | NOBYPASSRLS | CONNECTION LIMITconnlimit
| [ ENCRYPTED ] PASSWORD 'password
' | PASSWORD NULL | 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 whererole_specification
can be:role_name
| CURRENT_ROLE | CURRENT_USER | SESSION_USER
ALTER USER
现在是 ALTER ROLE
的别名。
ALTER USER
语句是 PostgreSQL 的扩展。SQL 标准将用户的定义留给实现。
如果您在文档中看到任何不正确的内容,与您对特定功能的体验不符,或者需要进一步澄清,请使用 此表单 报告文档问题。