]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/alter_group.sgml
More minor updates and copy-editing.
[postgresql] / doc / src / sgml / ref / alter_group.sgml
1 <!--
2 $PostgreSQL: pgsql/doc/src/sgml/ref/alter_group.sgml,v 1.15 2005/01/04 00:39:53 tgl Exp $
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-ALTERGROUP">
7  <refmeta>
8   <refentrytitle id="SQL-ALTERGROUP-title">ALTER GROUP</refentrytitle>
9   <refmiscinfo>SQL - Language Statements</refmiscinfo>
10  </refmeta>
11
12  <refnamediv>
13   <refname>ALTER GROUP</refname>
14   <refpurpose>change a user group</refpurpose>
15  </refnamediv>
16
17  <indexterm zone="sql-altergroup">
18   <primary>ALTER GROUP</primary>
19  </indexterm>
20
21  <refsynopsisdiv>
22 <synopsis>
23 ALTER GROUP <replaceable class="PARAMETER">groupname</replaceable> ADD USER <replaceable class="PARAMETER">username</replaceable> [, ... ]
24 ALTER GROUP <replaceable class="PARAMETER">groupname</replaceable> DROP USER <replaceable class="PARAMETER">username</replaceable> [, ... ]
25
26 ALTER GROUP <replaceable class="PARAMETER">groupname</replaceable> RENAME TO <replaceable>newname</replaceable>
27 </synopsis>
28  </refsynopsisdiv>
29
30  <refsect1>
31   <title>Description</title>
32
33   <para>
34    <command>ALTER GROUP</command> changes the attributes of a user group.
35   </para>
36
37   <para>
38    The first two variants add users to a group or remove them from a group.
39    Only database superusers can use this command.
40   </para>
41
42   <para>
43    The third variant changes the name of the group.  Only a database
44    superuser can rename groups.
45   </para>
46  </refsect1>
47
48  <refsect1>
49   <title>Parameters</title>
50
51   <variablelist>
52    <varlistentry>
53     <term><replaceable class="PARAMETER">groupname</replaceable></term>
54     <listitem>
55      <para>
56       The name of the group to modify.
57      </para>
58     </listitem>
59    </varlistentry>
60
61    <varlistentry>
62     <term><replaceable class="PARAMETER">username</replaceable></term>
63     <listitem>
64      <para>
65       Users that are to be added to or removed from the group. The users
66       must already exist; <command>ALTER GROUP</> does not create or
67       drop users.
68      </para>
69     </listitem>
70    </varlistentry>
71
72    <varlistentry>
73     <term><replaceable>newname</replaceable></term>
74     <listitem>
75      <para>
76       The new name of the group.
77      </para>
78     </listitem>
79    </varlistentry>
80   </variablelist>
81  </refsect1>
82
83  <refsect1>
84   <title>Examples</title>
85   <para>
86    Add users to a group:
87
88 <programlisting>
89 ALTER GROUP staff ADD USER karl, john;
90 </programlisting>
91
92    Remove a user from a group:
93
94 <programlisting>
95 ALTER GROUP workers DROP USER beth;
96 </programlisting>
97
98   </para>
99  </refsect1>
100
101  <refsect1>
102   <title>Compatibility</title>
103     
104   <para>
105    There is no <command>ALTER GROUP</command> statement in the SQL
106    standard. The concept of roles is similar.
107   </para>
108  </refsect1>
109
110  <refsect1>
111   <title>See Also</title>
112
113   <simplelist type="inline">
114    <member><xref linkend="sql-creategroup" endterm="sql-creategroup-title"></member>
115    <member><xref linkend="sql-dropgroup" endterm="sql-dropgroup-title"></member>
116   </simplelist>
117  </refsect1>
118
119 </refentry>
120
121 <!-- Keep this comment at the end of the file
122 Local variables:
123 mode: sgml
124 sgml-omittag:nil
125 sgml-shorttag:t
126 sgml-minimize-attributes:nil
127 sgml-always-quote-attributes:t
128 sgml-indent-step:1
129 sgml-indent-data:t
130 sgml-parent-document:nil
131 sgml-default-dtd-file:"../reference.ced"
132 sgml-exposed-tags:nil
133 sgml-local-catalogs:"/usr/lib/sgml/catalog"
134 sgml-local-ecat-files:nil
135 End:
136 -->