3
.\" Author: The PostgreSQL Global Development Group
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
6
.\" Manual: PostgreSQL 9.1beta1 Documentation
7
.\" Source: PostgreSQL 9.1beta1
10
.TH "ALTER GROUP" "7" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
22
ALTER_GROUP \- change role name or membership
27
ALTER GROUP \fIgroup_name\fR ADD USER \fIuser_name\fR [, \&.\&.\&. ]
28
ALTER GROUP \fIgroup_name\fR DROP USER \fIuser_name\fR [, \&.\&.\&. ]
30
ALTER GROUP \fIgroup_name\fR RENAME TO \fInew_name\fR
35
changes the attributes of a user group\&. This is an obsolete command, though still accepted for backwards compatibility, because groups (and users too) have been superseded by the more general concept of roles\&.
37
The first two variants add users to a group or remove them from a group\&. (Any role can play the part of either a
41
for this purpose\&.) These variants are effectively equivalent to granting or revoking membership in the role named as the
42
\(lqgroup\(rq; so the preferred way to do this is to use
47
The third variant changes the name of the group\&. This is exactly equivalent to renaming the role with
48
ALTER ROLE (\fBALTER_ROLE\fR(7))\&.
53
The name of the group (role) to modify\&.
58
Users (roles) that are to be added to or removed from the group\&. The users must already exist;
60
does not create or drop users\&.
65
The new name of the group\&.
75
ALTER GROUP staff ADD USER karl, john;
81
Remove a user from a group:
87
ALTER GROUP workers DROP USER beth;
96
statement in the SQL standard\&.
98
\fBGRANT\fR(7), \fBREVOKE\fR(7), ALTER ROLE (\fBALTER_ROLE\fR(7))