Imported upstream version 1.5
[manpages-zh.git] / raw / man7 / alter_group.7
blob882826fb80bd91730aa3c22c33c005c93ff27d6c
1 .\\" auto-generated by docbook2man-spec $Revision: 1.1 $
2 .TH "ALTER GROUP" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
3 .SH NAME
4 ALTER GROUP \- change a user group
6 .SH SYNOPSIS
7 .sp
8 .nf
9 ALTER GROUP \fIgroupname\fR ADD USER \fIusername\fR [, ... ]
10 ALTER GROUP \fIgroupname\fR DROP USER \fIusername\fR [, ... ]
12 ALTER GROUP \fIgroupname\fR RENAME TO \fInewname\fR
13 .sp
14 .fi
15 .SH "DESCRIPTION"
16 .PP
17 \fBALTER GROUP\fR is used to change a user group. The
18 first two variants add or remove users from a group. Only database
19 superusers can use this command. Adding a user to a group does not
20 create the user. Similarly, removing a user from a group does not
21 drop the user itself.
22 .PP
23 The third variant changes the name of the group. Only a database
24 superuser can rename groups.
25 .SH "PARAMETERS"
26 .TP
27 \fB\fIgroupname\fB\fR
28 The name of the group to modify.
29 .TP
30 \fB\fIusername\fB\fR
31 Users which are to be added or removed from the group. The users
32 must exist.
33 .TP
34 \fB\fInewname\fB\fR
35 The new name of the group.
36 .SH "EXAMPLES"
37 .PP
38 Add users to a group:
39 .sp
40 .nf
41 ALTER GROUP staff ADD USER karl, john;
42 .sp
43 .fi
44 Remove a user from a group:
45 .sp
46 .nf
47 ALTER GROUP workers DROP USER beth;
48 .sp
49 .fi
50 .SH "COMPATIBILITY"
51 .PP
52 There is no \fBALTER GROUP\fR statement in the SQL
53 standard. The concept of roles is similar.
54 .SH "SEE ALSO"
55 CREATE GROUP [\fBcreate_group\fR(7)], DROP GROUP [\fBdrop_group\fR(l)]