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

Commitf91370c

Browse files
committed
Update documentation to reflect the new ALTER OWNER rules for all
affected types of objects.
1 parenta9980ec commitf91370c

10 files changed

+95
-33
lines changed

‎doc/src/sgml/ref/alter_aggregate.sgml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_aggregate.sgml,v 1.6 2005/08/01 16:11:14 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_aggregate.sgml,v 1.7 2005/10/13 22:44:51 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -35,11 +35,15 @@ ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>type</replaceable
3535
</para>
3636

3737
<para>
38-
You must own the aggregate function to use <command>ALTER AGGREGATE</>;
39-
except for <command>ALTER AGGREGATE OWNER</>, which may only be executed by
40-
a superuser.
38+
You must own the aggregate function to use <command>ALTER AGGREGATE</>.
4139
To change the schema of an aggregate function, you must also have
4240
<literal>CREATE</literal> privilege on the new schema.
41+
To alter the owner, you must also be a direct or indirect member of the new
42+
owning role, and that role must have <literal>CREATE</literal> privilege on
43+
the aggregate function's schema. (These restrictions enforce that altering
44+
the owner doesn't do anything you couldn't do by dropping and recreating
45+
the aggregate function. However, a superuser can alter ownership of any
46+
aggregate function anyway.)
4347
</para>
4448
</refsect1>
4549

‎doc/src/sgml/ref/alter_conversion.sgml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_conversion.sgml,v 1.6 2005/03/07 04:30:51momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_conversion.sgml,v 1.7 2005/10/13 22:44:51tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -32,6 +32,16 @@ ALTER CONVERSION <replaceable>name</replaceable> OWNER TO <replaceable>newowner<
3232
<command>ALTER CONVERSION</command> changes the definition of a
3333
conversion.
3434
</para>
35+
36+
<para>
37+
You must own the conversion to use <command>ALTER CONVERSION</>.
38+
To alter the owner, you must also be a direct or indirect member of the new
39+
owning role, and that role must have <literal>CREATE</literal> privilege on
40+
the conversion's schema. (These restrictions enforce that altering the
41+
owner doesn't do anything you couldn't do by dropping and recreating the
42+
conversion. However, a superuser can alter ownership of any conversion
43+
anyway.)
44+
</para>
3545
</refsect1>
3646

3747
<refsect1>
@@ -60,8 +70,7 @@ ALTER CONVERSION <replaceable>name</replaceable> OWNER TO <replaceable>newowner<
6070
<term><replaceable class="parameter">newowner</replaceable></term>
6171
<listitem>
6272
<para>
63-
The new owner of the conversion. To change the owner of a conversion,
64-
you must be a superuser.
73+
The new owner of the conversion.
6574
</para>
6675
</listitem>
6776
</varlistentry>

‎doc/src/sgml/ref/alter_database.sgml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.16 2005/07/31 17:19:16 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.17 2005/10/13 22:44:51 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -71,8 +71,11 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> OWNER TO <repla
7171
</para>
7272

7373
<para>
74-
The fifth form changes the owner of the database. Only a superuser
75-
can change the database's owner.
74+
The fifth form changes the owner of the database.
75+
To alter the owner, you must own the database and also be a direct or
76+
indirect member of the new owning role, and you must have the
77+
<literal>CREATEDB</literal> privilege.
78+
(Note that superusers have all these privileges automatically.)
7679
</para>
7780
</refsect1>
7881

‎doc/src/sgml/ref/alter_domain.sgml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_domain.sgml,v 1.17 2005/08/01 16:11:14 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_domain.sgml,v 1.18 2005/10/13 22:44:51 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -112,10 +112,14 @@ ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
112112
</variablelist>
113113

114114
<para>
115-
You must own the domain to use <command>ALTER DOMAIN</>; except for
116-
<command>ALTER DOMAIN OWNER</>, which may only be executed by a superuser.
117-
To change a domain's schema, you must also have <literal>CREATE</>
118-
privilege on the new schema.
115+
You must own the domain to use <command>ALTER DOMAIN</>.
116+
To change the schema of a domain, you must also have
117+
<literal>CREATE</literal> privilege on the new schema.
118+
To alter the owner, you must also be a direct or indirect member of the new
119+
owning role, and that role must have <literal>CREATE</literal> privilege on
120+
the domain's schema. (These restrictions enforce that altering the owner
121+
doesn't do anything you couldn't do by dropping and recreating the domain.
122+
However, a superuser can alter ownership of any domain anyway.)
119123
</para>
120124
</refsect1>
121125

‎doc/src/sgml/ref/alter_function.sgml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.8 2005/08/01 16:11:14 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.9 2005/10/13 22:44:51 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -46,10 +46,14 @@ where <replaceable class="PARAMETER">action</replaceable> is one of:
4646
</para>
4747

4848
<para>
49-
You must own the function to use <command>ALTER FUNCTION</>; except for
50-
<command>ALTER FUNCTION OWNER</>, which may only be executed by a superuser.
49+
You must own the function to use <command>ALTER FUNCTION</>.
5150
To change a function's schema, you must also have <literal>CREATE</>
5251
privilege on the new schema.
52+
To alter the owner, you must also be a direct or indirect member of the new
53+
owning role, and that role must have <literal>CREATE</literal> privilege on
54+
the function's schema. (These restrictions enforce that altering the owner
55+
doesn't do anything you couldn't do by dropping and recreating the function.
56+
However, a superuser can alter ownership of any function anyway.)
5357
</para>
5458
</refsect1>
5559

‎doc/src/sgml/ref/alter_opclass.sgml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_opclass.sgml,v 1.5 2004/06/25 21:55:50 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_opclass.sgml,v 1.6 2005/10/13 22:44:51 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -32,6 +32,16 @@ ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="p
3232
<command>ALTER OPERATOR CLASS</command> changes the definition of
3333
an operator class.
3434
</para>
35+
36+
<para>
37+
You must own the operator class to use <command>ALTER OPERATOR CLASS</>.
38+
To alter the owner, you must also be a direct or indirect member of the new
39+
owning role, and that role must have <literal>CREATE</literal> privilege on
40+
the operator class's schema. (These restrictions enforce that altering the
41+
owner doesn't do anything you couldn't do by dropping and recreating the
42+
operator class. However, a superuser can alter ownership of any operator
43+
class anyway.)
44+
</para>
3545
</refsect1>
3646

3747
<refsect1>
@@ -71,7 +81,6 @@ ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="p
7181
<listitem>
7282
<para>
7383
The new owner of the operator class.
74-
You must be a superuser to change the owner of an operator class.
7584
</para>
7685
</listitem>
7786
</varlistentry>

‎doc/src/sgml/ref/alter_operator.sgml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_operator.sgml,v 1.1 2004/06/25 21:55:50 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_operator.sgml,v 1.2 2005/10/13 22:44:51 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -32,6 +32,15 @@ ALTER OPERATOR <replaceable>name</replaceable> ( { <replaceable>lefttype</replac
3232
an operator. The only currently available functionality is to change the
3333
owner of the operator.
3434
</para>
35+
36+
<para>
37+
You must own the operator to use <command>ALTER OPERATOR</>.
38+
To alter the owner, you must also be a direct or indirect member of the new
39+
owning role, and that role must have <literal>CREATE</literal> privilege on
40+
the operator's schema. (These restrictions enforce that altering the owner
41+
doesn't do anything you couldn't do by dropping and recreating the operator.
42+
However, a superuser can alter ownership of any operator anyway.)
43+
</para>
3544
</refsect1>
3645

3746
<refsect1>
@@ -72,7 +81,6 @@ ALTER OPERATOR <replaceable>name</replaceable> ( { <replaceable>lefttype</replac
7281
<listitem>
7382
<para>
7483
The new owner of the operator.
75-
You must be a superuser to change the owner of an operator.
7684
</para>
7785
</listitem>
7886
</varlistentry>

‎doc/src/sgml/ref/alter_schema.sgml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_schema.sgml,v 1.7 2004/06/25 21:55:50 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_schema.sgml,v 1.8 2005/10/13 22:44:51 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -30,9 +30,16 @@ ALTER SCHEMA <replaceable>name</replaceable> OWNER TO <replaceable>newowner</rep
3030

3131
<para>
3232
<command>ALTER SCHEMA</command> changes the definition of a schema.
33-
To rename a schema you must own the schema and have the privilege
34-
<literal>CREATE</literal> for the database. To change the owner
35-
of a schema, you must be a superuser.
33+
</para>
34+
35+
<para>
36+
You must own the schema to use <command>ALTER SCHEMA</>.
37+
To rename a schema you must also have the
38+
<literal>CREATE</literal> privilege for the database.
39+
To alter the owner, you must also be a direct or
40+
indirect member of the new owning role, and you must have the
41+
<literal>CREATE</literal> privilege for the database.
42+
(Note that superusers have all these privileges automatically.)
3643
</para>
3744
</refsect1>
3845

‎doc/src/sgml/ref/alter_tablespace.sgml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_tablespace.sgml,v 1.1 2004/06/25 21:55:50 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_tablespace.sgml,v 1.2 2005/10/13 22:44:51 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -32,6 +32,13 @@ ALTER TABLESPACE <replaceable>name</replaceable> OWNER TO <replaceable>newowner<
3232
<command>ALTER TABLESPACE</command> changes the definition of
3333
a tablespace.
3434
</para>
35+
36+
<para>
37+
You must own the tablespace to use <command>ALTER TABLESPACE</>.
38+
To alter the owner, you must also be a direct or indirect member of the new
39+
owning role.
40+
(Note that superusers have these privileges automatically.)
41+
</para>
3542
</refsect1>
3643

3744
<refsect1>
@@ -63,7 +70,6 @@ ALTER TABLESPACE <replaceable>name</replaceable> OWNER TO <replaceable>newowner<
6370
<listitem>
6471
<para>
6572
The new owner of the tablespace.
66-
You must be a superuser to change the owner of a tablespace.
6773
</para>
6874
</listitem>
6975
</varlistentry>

‎doc/src/sgml/ref/alter_type.sgml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_type.sgml,v 1.2 2005/08/01 16:11:14 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_type.sgml,v 1.3 2005/10/13 22:44:51 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -37,6 +37,17 @@ ALTER TYPE <replaceable class="PARAMETER">name</replaceable> SET SCHEMA <replace
3737
The only currently available capabilities are changing the owner and schema
3838
of a type.
3939
</para>
40+
41+
<para>
42+
You must own the type to use <command>ALTER TYPE</>.
43+
To change the schema of a type, you must also have
44+
<literal>CREATE</literal> privilege on the new schema.
45+
To alter the owner, you must also be a direct or indirect member of the new
46+
owning role, and that role must have <literal>CREATE</literal> privilege on
47+
the type's schema. (These restrictions enforce that altering the owner
48+
doesn't do anything you couldn't do by dropping and recreating the type.
49+
However, a superuser can alter ownership of any type anyway.)
50+
</para>
4051
</refsect1>
4152

4253
<refsect1>
@@ -59,7 +70,6 @@ ALTER TYPE <replaceable class="PARAMETER">name</replaceable> SET SCHEMA <replace
5970
<listitem>
6071
<para>
6172
The user name of the new owner of the type.
62-
You must be a superuser to change a type's owner.
6373
</para>
6474
</listitem>
6575
</varlistentry>
@@ -68,9 +78,7 @@ ALTER TYPE <replaceable class="PARAMETER">name</replaceable> SET SCHEMA <replace
6878
<term><replaceable class="PARAMETER">new_schema</replaceable></term>
6979
<listitem>
7080
<para>
71-
The new schema for the type. To move a
72-
type to a new schema, you must be the owner of the
73-
type and have <literal>CREATE</> privilege on the new schema.
81+
The new schema for the type.
7482
</para>
7583
</listitem>
7684
</varlistentry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp