drop_role.7

来自「PostgreSQL 8.2中增加了很多企业用户所需要的功能和性能上的提高,其开」· 7 代码 · 共 58 行

7
58
字号
.\\" auto-generated by docbook2man-spec $Revision: 1.1.1.1 $.TH "DROP ROLE" "" "2008-01-03" "SQL - Language Statements" "SQL Commands".SH NAMEDROP ROLE \- remove a database role.SH SYNOPSIS.sp.nfDROP ROLE [ IF EXISTS ] \fIname\fR [, ...].sp.fi.SH "DESCRIPTION".PP\fBDROP ROLE\fR removes the specified role(s).To drop a superuser role, you must be a superuser yourself;to drop non-superuser roles, you must have CREATEROLEprivilege..PPA role cannot be removed if it is still referenced in any databaseof the cluster; an error will be raised if so. Before dropping the role,you must drop all the objects it owns (or reassign their ownership)and revoke any privileges the role has been granted. The REASSIGN OWNED [\fBreassign_owned\fR(7)]and DROP OWNED [\fBdrop_owned\fR(7)]commands can be useful for this purpose..PPHowever, it is not necessary to remove role memberships involvingthe role; \fBDROP ROLE\fR automatically revokes any membershipsof the target role in other roles, and of other roles in the target role.The other roles are not dropped nor otherwise affected..SH "PARAMETERS".TP\fBIF EXISTS\fRDo not throw an error if the role does not exist. A notice is issued in this case..TP\fB\fIname\fB\fRThe name of the role to remove..SH "NOTES".PPPostgreSQL includes a program dropuser [\fBdropuser\fR(1)] that has thesame functionality as this command (in fact, it calls this command)but can be run from the command shell..SH "EXAMPLES".PPTo drop a role:.sp.nfDROP ROLE jonathan;.sp.fi.SH "COMPATIBILITY".PPThe SQL standard defines \fBDROP ROLE\fR, but it allowsonly one role to be dropped at a time, and it specifies differentprivilege requirements than PostgreSQL uses..SH "SEE ALSO"CREATE ROLE [\fBcreate_role\fR(7)], ALTER ROLE [\fBalter_role\fR(l)], SET ROLE [\fBset_role\fR(l)]

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?