Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd73336f

Browse files
author
Neil Conway
committed
Correct some errors and do some SGML police work on the reference pages
for REASSIGN OWNED and DROP OWNED.
1 parenta619e06 commitd73336f

File tree

3 files changed

+104
-33
lines changed

3 files changed

+104
-33
lines changed

‎doc/src/sgml/ref/drop_owned.sgml

Lines changed: 51 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_owned.sgml,v 1.1 2005/11/21 12:49:30 alvherre Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_owned.sgml,v 1.2 2006/04/02 04:02:40 neilc Exp $
33
PostgreSQL documentation
44
-->
55

@@ -20,44 +20,76 @@ PostgreSQL documentation
2020

2121
<refsynopsisdiv>
2222
<synopsis>
23-
DROP OWNED <replaceable class="PARAMETER">name</replaceable> [, ...] [ RESTRICT | CASCADE ]
23+
DROP OWNEDBY<replaceable class="PARAMETER">name</replaceable> [, ...] [ RESTRICT | CASCADE ]
2424
</synopsis>
2525
</refsynopsisdiv>
2626

2727
<refsect1>
2828
<title>Description</title>
2929

3030
<para>
31-
The<command>DROP OWNED</command>instructsthesystem to drop those
32-
databaseobjectsowned by one of thegiven roles which reside on the
33-
current database. Allprivileges granted to the given roleswill also be
34-
revoked.
31+
<command>DROP OWNED</command>drops alltheobjects in the current
32+
databasethat areowned by one of thespecified roles. Any
33+
privileges granted to the given roleson objects in the current
34+
database will also berevoked.
3535
</para>
36+
</refsect1>
3637

37-
<para>
38-
If <literal>CASCADE</> is specified, <command>DROP OWNED</command>
39-
will behave like a <command>DROP ... CASCADE</command> was issued
40-
for each object, that is, objects dependent on the ones owned by the
41-
given users will be dropped as well.
42-
</para>
38+
<refsect1>
39+
<title>Parameters</title>
40+
41+
<variablelist>
42+
<varlistentry>
43+
<term><replaceable class="PARAMETER">name</replaceable></term>
44+
<listitem>
45+
<para>
46+
The name of a role whose objects will be dropped, and whose
47+
privileges will be revoked.
48+
</para>
49+
</listitem>
50+
</varlistentry>
51+
52+
<varlistentry>
53+
<term><literal>CASCADE</literal></term>
54+
<listitem>
55+
<para>
56+
Automatically drop objects that depend on the affected objects.
57+
</para>
58+
</listitem>
59+
</varlistentry>
60+
61+
<varlistentry>
62+
<term><literal>RESTRICT</literal></term>
63+
<listitem>
64+
<para>
65+
Refuse to drop the objects owned by a role if any other database
66+
objects depend on one of the affected objects. This is the default.
67+
</para>
68+
</listitem>
69+
</varlistentry>
70+
</variablelist>
4371
</refsect1>
4472

4573
<refsect1>
4674
<title>Notes</title>
4775
<para>
48-
The <command>DROP OWNED</command> command is mostly used in preparation to
49-
drop the roles. It may be necessary to issue the command in more than one
50-
database.
76+
<command>DROP OWNED</command> is often used to prepare for the
77+
removal of one or more roles. Because <command>DROP OWNED</command>
78+
only affects the objects in the current database, it is usually
79+
necessary to execute this command in each database that contains
80+
objects owned by a role that is to be removed.
5181
</para>
5282

5383
<para>
54-
Using the <literal>CASCADE</literal> option may make the command recurse to
55-
objects owned by other users.
84+
Using the <literal>CASCADE</literal> option may make the command
85+
recurse toobjects owned by other users.
5686
</para>
5787

5888
<para>
59-
See the <command>REASSIGN OWNED</command> command for an alternative that
60-
gives the objects away to another role.
89+
The <xref linkend="sql-reassign-owned"
90+
endterm="sql-reassign-owned-title"> command is an alternative that
91+
reassigns the ownership of all the database objects owned by one or
92+
more roles.
6193
</para>
6294
</refsect1>
6395

‎doc/src/sgml/ref/drop_role.sgml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_role.sgml,v 1.3 2006/02/04 22:38:39 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_role.sgml,v 1.4 2006/04/02 04:02:40 neilc Exp $
33
PostgreSQL documentation
44
-->
55

@@ -38,7 +38,10 @@ DROP ROLE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [, ...
3838
A role cannot be removed if it is still referenced in any database
3939
of the cluster; an error will be raised if so. Before dropping the role,
4040
you must drop all the objects it owns (or reassign their ownership)
41-
and revoke any privileges the role has been granted.
41+
and revoke any privileges the role has been granted. The <xref
42+
linkend="sql-reassign-owned" endterm="sql-reassign-owned-title">
43+
and <xref linkend="sql-drop-owned" endterm="sql-drop-owned-title">
44+
commands can be useful for this purpose.
4245
</para>
4346

4447
<para>

‎doc/src/sgml/ref/reassign_owned.sgml

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/reassign_owned.sgml,v 1.1 2005/11/21 12:49:30 alvherre Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/reassign_owned.sgml,v 1.2 2006/04/02 04:02:40 neilc Exp $
33
PostgreSQL documentation
44
-->
55

@@ -11,7 +11,7 @@ PostgreSQL documentation
1111

1212
<refnamediv>
1313
<refname>REASSIGN OWNED</refname>
14-
<refpurpose>change ownership of database objects owned by a database role</refpurpose>
14+
<refpurpose>changetheownership of database objects owned by a database role</refpurpose>
1515
</refnamediv>
1616

1717
<indexterm zone="sql-reassign-owned">
@@ -20,33 +20,69 @@ PostgreSQL documentation
2020

2121
<refsynopsisdiv>
2222
<synopsis>
23-
REASSIGN OWNED <replaceable class="PARAMETER">old_role</replaceable> [, ...] TO <replaceable class="PARAMETER">new_role</replaceable>
23+
REASSIGN OWNEDBY<replaceable class="PARAMETER">old_role</replaceable> [, ...] TO <replaceable class="PARAMETER">new_role</replaceable>
2424
</synopsis>
2525
</refsynopsisdiv>
2626

2727
<refsect1>
2828
<title>Description</title>
2929

3030
<para>
31-
The<command>REASSIGN OWNED</command> instructs the system to change
32-
the ownership of the database objects owned by one of the old_roles,
33-
to new_role.
31+
<command>REASSIGN OWNED</command> instructs the system to change
32+
the ownership of the database objects owned by one of the
33+
old_roles,to new_role.
3434
</para>
3535
</refsect1>
3636

37+
<refsect1>
38+
<title>Parameters</title>
39+
40+
<variablelist>
41+
<varlistentry>
42+
<term><replaceable class="PARAMETER">old_role</replaceable></term>
43+
<listitem>
44+
<para>
45+
The name of a role. The ownership of all the objects in the
46+
current database owned by this role will be reassigned to
47+
<replaceable class="PARAMETER">new_role</replaceable>.
48+
</para>
49+
</listitem>
50+
</varlistentry>
51+
52+
<varlistentry>
53+
<term><replaceable class="PARAMETER">new_role</replaceable></term>
54+
<listitem>
55+
<para>
56+
The name of the role that will be made the new owner of the
57+
affected objects.
58+
</para>
59+
</listitem>
60+
</varlistentry>
61+
</variablelist>
62+
</refsect1>
63+
3764
<refsect1>
3865
<title>Notes</title>
3966

4067
<para>
41-
The <command>REASSIGN OWNED</command> command is mostly used in preparation to
42-
drop the roles. See the <command>DROP OWNED</command> command for an
43-
alternative that drops the objects.
68+
<command>REASSIGN OWNED</command> is often used to prepare for the
69+
removal of one or more roles. Because <command>REASSIGN
70+
OWNED</command> only affects the objects in the current database,
71+
it is usually necessary to execute this command in each database
72+
that contains objects owned by a role that is to be removed.
73+
</para>
74+
75+
<para>
76+
The <xref linkend="sql-drop-owned"
77+
endterm="sql-drop-owned-title"> command is an alternative that
78+
drops all the database objects owned by one or more roles.
4479
</para>
4580

4681
<para>
47-
The <command>REASSIGN OWNED</command> command does not affect the privileges
48-
granted to the old_roles in objects not owned by them. Use
49-
<command>DROP OWNED</command> to remove them.
82+
The <command>REASSIGN OWNED</command> command does not affect the
83+
privileges granted to the old_roles in objects that are not owned
84+
by them. Use <command>DROP OWNED</command> to revoke those
85+
privileges.
5086
</para>
5187

5288
</refsect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp