Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
6d3f74d8
Commit
6d3f74d8
authored
20 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Update and copy-edit description of privileges.
parent
519cef22
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/user-manag.sgml
+25
-22
25 additions, 22 deletions
doc/src/sgml/user-manag.sgml
with
25 additions
and
22 deletions
doc/src/sgml/user-manag.sgml
+
25
−
22
View file @
6d3f74d8
<!--
$PostgreSQL: pgsql/doc/src/sgml/user-manag.sgml,v 1.2
8
2005/0
2
/25
02
:3
4
:5
6 momjian
Exp $
$PostgreSQL: pgsql/doc/src/sgml/user-manag.sgml,v 1.2
9
2005/0
3
/25
16
:3
8
:5
8 tgl
Exp $
-->
<chapter id="user-manag">
...
...
@@ -260,42 +260,37 @@ SELECT groname FROM pg_group;
<para>
When an object is created, it is assigned an owner. The
owner is the user that executed the creation statement. To change
the owner of a table, index, sequence, or view, use the
<command>ALTER TABLE</command> command. By default, only an owner
(or a superuser) can do anything with the object. In order to allow
owner is normally the user that executed the creation statement.
For most kinds of objects, the initial state is that only the owner
(or a superuser) can do anything with the object. To allow
other users to use it, <firstterm>privileges</firstterm> must be
granted.
</para>
<para>
There are several different privileges: <literal>SELECT</>,
There are several different kinds of privilege: <literal>SELECT</>,
<literal>INSERT</>, <literal>UPDATE</>, <literal>DELETE</>,
<literal>RULE</>, <literal>REFERENCES</>, <literal>TRIGGER</>,
<literal>CREATE</>, <literal>TEMPORARY</>, <literal>EXECUTE</>,
<literal>USAGE</>,
and <literal>
ALL PRIVILE
GE
S
</>. For more
and <literal>
USA
GE</>. For more
information on the different types of privileges supported by
<productname>PostgreSQL</productname>, see the
<xref linkend="sql-grant" endterm="sql-grant-title"> reference page.
The right to modify or
destroy an object is always the privilege of the owner only. To
assign privileges, the <command>GRANT</command> command is
</para>
<para>
To assign privileges, the <command>GRANT</command> command is
used. So, if <literal>joe</literal> is an existing user, and
<literal>accounts</literal> is an existing table, the privilege to
update the table can be granted with
<programlisting>
GRANT UPDATE ON accounts TO joe;
</programlisting>
The user executing this command must be the owner of the table. To
grant a privilege to a group, use
To grant a privilege to a group, use
<programlisting>
GRANT SELECT ON accounts TO GROUP staff;
</programlisting>
The special
<quote>user</quote>
name <literal>PUBLIC</literal> can
The special name <literal>PUBLIC</literal> can
be used to grant a privilege to every user on the system. Writing
<literal>ALL</literal> in place of a specific privilege specifies that all
privileges will be granted.
privileges
that apply to the object
will be granted.
</para>
<para>
...
...
@@ -304,13 +299,21 @@ GRANT SELECT ON accounts TO GROUP staff;
<programlisting>
REVOKE ALL ON accounts FROM PUBLIC;
</programlisting>
The special privileges of the table owner (i.e., the right to do
<command>DROP</>, <command>GRANT</>, <command>REVOKE</>, etc)
are always implicit in being the owner,
and cannot be granted or revoked. But the table owner can choose
</para>
<para>
The special privileges of an object's owner (i.e., the right to modify
or destroy the object) are always implicit in being the owner,
and cannot be granted or revoked. But the owner can choose
to revoke his own ordinary privileges, for example to make a
table read-only for himself as well as others.
</para>
<para>
An object can be assigned to a new owner with an <command>ALTER</command>
command of the appropriate kind for the object. Only superusers can do
this.
</para>
</sect1>
<sect1 id="perm-functions">
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment