~ubuntu-branches/ubuntu/precise/postgresql-9.1/precise-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/man7/ALTER_GROUP.7

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: ALTER GROUP
 
3
.\"    Author: The PostgreSQL Global Development Group
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
 
5
.\"      Date: 2011-04-27
 
6
.\"    Manual: PostgreSQL 9.1beta1 Documentation
 
7
.\"    Source: PostgreSQL 9.1beta1
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "ALTER GROUP" "7" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * set default formatting
 
13
.\" -----------------------------------------------------------------
 
14
.\" disable hyphenation
 
15
.nh
 
16
.\" disable justification (adjust text to left margin only)
 
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
 
21
.SH "NAME"
 
22
ALTER_GROUP \- change role name or membership
 
23
.\" ALTER GROUP
 
24
.SH "SYNOPSIS"
 
25
.sp
 
26
.nf
 
27
ALTER GROUP \fIgroup_name\fR ADD USER \fIuser_name\fR [, \&.\&.\&. ]
 
28
ALTER GROUP \fIgroup_name\fR DROP USER \fIuser_name\fR [, \&.\&.\&. ]
 
29
 
 
30
ALTER GROUP \fIgroup_name\fR RENAME TO \fInew_name\fR
 
31
.fi
 
32
.SH "DESCRIPTION"
 
33
.PP
 
34
ALTER GROUP
 
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\&.
 
36
.PP
 
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
 
38
\(lquser\(rq
 
39
or a
 
40
\(lqgroup\(rq
 
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
 
43
\fBGRANT\fR(7)
 
44
or
 
45
\fBREVOKE\fR(7)\&.
 
46
.PP
 
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))\&.
 
49
.SH "PARAMETERS"
 
50
.PP
 
51
\fIgroup_name\fR
 
52
.RS 4
 
53
The name of the group (role) to modify\&.
 
54
.RE
 
55
.PP
 
56
\fIuser_name\fR
 
57
.RS 4
 
58
Users (roles) that are to be added to or removed from the group\&. The users must already exist;
 
59
ALTER GROUP
 
60
does not create or drop users\&.
 
61
.RE
 
62
.PP
 
63
\fInew_name\fR
 
64
.RS 4
 
65
The new name of the group\&.
 
66
.RE
 
67
.SH "EXAMPLES"
 
68
.PP
 
69
Add users to a group:
 
70
.sp
 
71
.if n \{\
 
72
.RS 4
 
73
.\}
 
74
.nf
 
75
ALTER GROUP staff ADD USER karl, john;
 
76
.fi
 
77
.if n \{\
 
78
.RE
 
79
.\}
 
80
.sp
 
81
Remove a user from a group:
 
82
.sp
 
83
.if n \{\
 
84
.RS 4
 
85
.\}
 
86
.nf
 
87
ALTER GROUP workers DROP USER beth;
 
88
.fi
 
89
.if n \{\
 
90
.RE
 
91
.\}
 
92
.SH "COMPATIBILITY"
 
93
.PP
 
94
There is no
 
95
ALTER GROUP
 
96
statement in the SQL standard\&.
 
97
.SH "SEE ALSO"
 
98
\fBGRANT\fR(7), \fBREVOKE\fR(7), ALTER ROLE (\fBALTER_ROLE\fR(7))