1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/ref/grant.sgml,v 1.21 2002/02 /21 22:39:36 momjian Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/grant.sgml,v 1.22 2002/04 /21 00:26:42 tgl Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -18,7 +18,11 @@ PostgreSQL documentation
18
18
<synopsis>
19
19
GRANT { { SELECT | INSERT | UPDATE | DELETE | RULE | REFERENCES | TRIGGER }
20
20
[,...] | ALL [ PRIVILEGES ] }
21
- ON [ TABLE ] <replaceable class="PARAMETER">objectname</replaceable> [, ...]
21
+ ON [ TABLE ] <replaceable class="PARAMETER">tablename</replaceable> [, ...]
22
+ TO { <replaceable class="PARAMETER">username</replaceable> | GROUP <replaceable class="PARAMETER">groupname</replaceable> | PUBLIC } [, ...]
23
+
24
+ GRANT { { CREATE | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }
25
+ ON DATABASE <replaceable>dbname</replaceable> [, ...]
22
26
TO { <replaceable class="PARAMETER">username</replaceable> | GROUP <replaceable class="PARAMETER">groupname</replaceable> | PUBLIC } [, ...]
23
27
24
28
GRANT { EXECUTE | ALL [ PRIVILEGES ] }
@@ -28,6 +32,10 @@ GRANT { EXECUTE | ALL [ PRIVILEGES ] }
28
32
GRANT { USAGE | ALL [ PRIVILEGES ] }
29
33
ON LANGUAGE <replaceable>langname</replaceable> [, ...]
30
34
TO { <replaceable class="PARAMETER">username</replaceable> | GROUP <replaceable class="PARAMETER">groupname</replaceable> | PUBLIC } [, ...]
35
+
36
+ GRANT { { CREATE | USAGE } [,...] | ALL [ PRIVILEGES ] }
37
+ ON SCHEMA <replaceable>schemaname</replaceable> [, ...]
38
+ TO { <replaceable class="PARAMETER">username</replaceable> | GROUP <replaceable class="PARAMETER">groupname</replaceable> | PUBLIC } [, ...]
31
39
</synopsis>
32
40
</refsynopsisdiv>
33
41
@@ -36,7 +44,8 @@ GRANT { USAGE | ALL [ PRIVILEGES ] }
36
44
37
45
<para>
38
46
The <command>GRANT</command> command gives specific permissions on
39
- an object (table, view, sequence, function, procedural language) to
47
+ an object (table, view, sequence, database, function, procedural language,
48
+ or schema) to
40
49
one or more users or groups of users. These permissions are added
41
50
to those already granted, if any.
42
51
</para>
@@ -144,6 +153,29 @@ GRANT { USAGE | ALL [ PRIVILEGES ] }
144
153
</listitem>
145
154
</varlistentry>
146
155
156
+ <varlistentry>
157
+ <term>CREATE</term>
158
+ <listitem>
159
+ <para>
160
+ For databases, allows new schemas to be created in the database.
161
+ </para>
162
+ <para>
163
+ For schemas, allows new objects to be created within the specified
164
+ schema.
165
+ </para>
166
+ </listitem>
167
+ </varlistentry>
168
+
169
+ <varlistentry>
170
+ <term>TEMPORARY</term>
171
+ <term>TEMP</term>
172
+ <listitem>
173
+ <para>
174
+ Allows temporary tables to be created while using the database.
175
+ </para>
176
+ </listitem>
177
+ </varlistentry>
178
+
147
179
<varlistentry>
148
180
<term>EXECUTE</term>
149
181
<listitem>
@@ -159,10 +191,16 @@ GRANT { USAGE | ALL [ PRIVILEGES ] }
159
191
<term>USAGE</term>
160
192
<listitem>
161
193
<para>
162
- Allows the use of the specified procedural language for the
163
- creation of functions in that language. This is the only type
194
+ For procedural languages, allows the use of the specified language for
195
+ the creation of functions in that language. This is the only type
164
196
of privilege that is applicable to procedural languages.
165
197
</para>
198
+ <para>
199
+ For schemas, allows the use of objects contained in the specified
200
+ schema (assuming that the objects' own privilege requirements are
201
+ met). Essentially this allows the grantee to <quote>look up</>
202
+ objects within the schema.
203
+ </para>
166
204
</listitem>
167
205
</varlistentry>
168
206
@@ -226,7 +264,11 @@ GRANT { USAGE | ALL [ PRIVILEGES ] }
226
264
R -- RULE
227
265
x -- REFERENCES
228
266
t -- TRIGGER
229
- arwdRxt -- ALL PRIVILEGES
267
+ X -- EXECUTE
268
+ U -- USAGE
269
+ C -- CREATE
270
+ T -- TEMPORARY
271
+ arwdRxt -- ALL PRIVILEGES (for tables)
230
272
</programlisting>
231
273
</para>
232
274
0 commit comments