diff --git a/doc/src/sgml/ref/alter_aggregate.sgml b/doc/src/sgml/ref/alter_aggregate.sgml
index b8d9075123..c3311b99ce 100644
--- a/doc/src/sgml/ref/alter_aggregate.sgml
+++ b/doc/src/sgml/ref/alter_aggregate.sgml
@@ -1,5 +1,5 @@
@@ -35,11 +35,15 @@ ALTER AGGREGATE name ( type
- You must own the aggregate function to use ALTER AGGREGATE>;
- except for ALTER AGGREGATE OWNER>, which may only be executed by
- a superuser.
+ You must own the aggregate function to use ALTER AGGREGATE>.
To change the schema of an aggregate function, you must also have
CREATE privilege on the new schema.
+ To alter the owner, you must also be a direct or indirect member of the new
+ owning role, and that role must have CREATE privilege on
+ the aggregate function's schema. (These restrictions enforce that altering
+ the owner doesn't do anything you couldn't do by dropping and recreating
+ the aggregate function. However, a superuser can alter ownership of any
+ aggregate function anyway.)
diff --git a/doc/src/sgml/ref/alter_conversion.sgml b/doc/src/sgml/ref/alter_conversion.sgml
index dc86fcf681..50ab29a48a 100644
--- a/doc/src/sgml/ref/alter_conversion.sgml
+++ b/doc/src/sgml/ref/alter_conversion.sgml
@@ -1,5 +1,5 @@
@@ -32,6 +32,16 @@ ALTER CONVERSION name OWNER TO newowner<
ALTER CONVERSION changes the definition of a
conversion.
+
+
+ You must own the conversion to use ALTER CONVERSION>.
+ To alter the owner, you must also be a direct or indirect member of the new
+ owning role, and that role must have CREATE privilege on
+ the conversion's schema. (These restrictions enforce that altering the
+ owner doesn't do anything you couldn't do by dropping and recreating the
+ conversion. However, a superuser can alter ownership of any conversion
+ anyway.)
+
@@ -60,8 +70,7 @@ ALTER CONVERSION name OWNER TO newowner<
newowner
- The new owner of the conversion. To change the owner of a conversion,
- you must be a superuser.
+ The new owner of the conversion.
diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml
index 03333d3d99..9c19f849f2 100644
--- a/doc/src/sgml/ref/alter_database.sgml
+++ b/doc/src/sgml/ref/alter_database.sgml
@@ -1,5 +1,5 @@
@@ -71,8 +71,11 @@ ALTER DATABASE name OWNER TO
- The fifth form changes the owner of the database. Only a superuser
- can change the database's owner.
+ The fifth form changes the owner of the database.
+ To alter the owner, you must own the database and also be a direct or
+ indirect member of the new owning role, and you must have the
+ CREATEDB privilege.
+ (Note that superusers have all these privileges automatically.)
diff --git a/doc/src/sgml/ref/alter_domain.sgml b/doc/src/sgml/ref/alter_domain.sgml
index 4cc6b25018..f3ed88c9e2 100644
--- a/doc/src/sgml/ref/alter_domain.sgml
+++ b/doc/src/sgml/ref/alter_domain.sgml
@@ -1,5 +1,5 @@
@@ -112,10 +112,14 @@ ALTER DOMAIN name
- You must own the domain to use ALTER DOMAIN>; except for
- ALTER DOMAIN OWNER>, which may only be executed by a superuser.
- To change a domain's schema, you must also have CREATE>
- privilege on the new schema.
+ You must own the domain to use ALTER DOMAIN>.
+ To change the schema of a domain, you must also have
+ CREATE privilege on the new schema.
+ To alter the owner, you must also be a direct or indirect member of the new
+ owning role, and that role must have CREATE privilege on
+ the domain's schema. (These restrictions enforce that altering the owner
+ doesn't do anything you couldn't do by dropping and recreating the domain.
+ However, a superuser can alter ownership of any domain anyway.)
diff --git a/doc/src/sgml/ref/alter_function.sgml b/doc/src/sgml/ref/alter_function.sgml
index 211a350f84..a3dd38d2d4 100644
--- a/doc/src/sgml/ref/alter_function.sgml
+++ b/doc/src/sgml/ref/alter_function.sgml
@@ -1,5 +1,5 @@
@@ -46,10 +46,14 @@ where action is one of:
- You must own the function to use ALTER FUNCTION>; except for
- ALTER FUNCTION OWNER>, which may only be executed by a superuser.
+ You must own the function to use ALTER FUNCTION>.
To change a function's schema, you must also have CREATE>
privilege on the new schema.
+ To alter the owner, you must also be a direct or indirect member of the new
+ owning role, and that role must have CREATE privilege on
+ the function's schema. (These restrictions enforce that altering the owner
+ doesn't do anything you couldn't do by dropping and recreating the function.
+ However, a superuser can alter ownership of any function anyway.)
diff --git a/doc/src/sgml/ref/alter_opclass.sgml b/doc/src/sgml/ref/alter_opclass.sgml
index d4171ceb2f..e1d09fe905 100644
--- a/doc/src/sgml/ref/alter_opclass.sgml
+++ b/doc/src/sgml/ref/alter_opclass.sgml
@@ -1,5 +1,5 @@
@@ -32,6 +32,16 @@ ALTER OPERATOR CLASS name USING
The new owner of the operator class.
- You must be a superuser to change the owner of an operator class.
diff --git a/doc/src/sgml/ref/alter_operator.sgml b/doc/src/sgml/ref/alter_operator.sgml
index cfec153f2b..bd9aa24f0f 100644
--- a/doc/src/sgml/ref/alter_operator.sgml
+++ b/doc/src/sgml/ref/alter_operator.sgml
@@ -1,5 +1,5 @@
@@ -32,6 +32,15 @@ ALTER OPERATOR name ( { lefttype
+
+
+ You must own the operator to use ALTER OPERATOR>.
+ To alter the owner, you must also be a direct or indirect member of the new
+ owning role, and that role must have CREATE privilege on
+ the operator's schema. (These restrictions enforce that altering the owner
+ doesn't do anything you couldn't do by dropping and recreating the operator.
+ However, a superuser can alter ownership of any operator anyway.)
+
@@ -72,7 +81,6 @@ ALTER OPERATOR name ( { lefttype
The new owner of the operator.
- You must be a superuser to change the owner of an operator.
diff --git a/doc/src/sgml/ref/alter_schema.sgml b/doc/src/sgml/ref/alter_schema.sgml
index 702df1da39..27acc8ca04 100644
--- a/doc/src/sgml/ref/alter_schema.sgml
+++ b/doc/src/sgml/ref/alter_schema.sgml
@@ -1,5 +1,5 @@
@@ -30,9 +30,16 @@ ALTER SCHEMA name OWNER TO newowner
ALTER SCHEMA changes the definition of a schema.
- To rename a schema you must own the schema and have the privilege
- CREATE for the database. To change the owner
- of a schema, you must be a superuser.
+
+
+
+ You must own the schema to use ALTER SCHEMA>.
+ To rename a schema you must also have the
+ CREATE privilege for the database.
+ To alter the owner, you must also be a direct or
+ indirect member of the new owning role, and you must have the
+ CREATE privilege for the database.
+ (Note that superusers have all these privileges automatically.)
diff --git a/doc/src/sgml/ref/alter_tablespace.sgml b/doc/src/sgml/ref/alter_tablespace.sgml
index bdfe4b8155..29c9d6778f 100644
--- a/doc/src/sgml/ref/alter_tablespace.sgml
+++ b/doc/src/sgml/ref/alter_tablespace.sgml
@@ -1,5 +1,5 @@
@@ -32,6 +32,13 @@ ALTER TABLESPACE name OWNER TO newowner<
ALTER TABLESPACE changes the definition of
a tablespace.
+
+
+ You must own the tablespace to use ALTER TABLESPACE>.
+ To alter the owner, you must also be a direct or indirect member of the new
+ owning role.
+ (Note that superusers have these privileges automatically.)
+
@@ -63,7 +70,6 @@ ALTER TABLESPACE name OWNER TO newowner<
The new owner of the tablespace.
- You must be a superuser to change the owner of a tablespace.
diff --git a/doc/src/sgml/ref/alter_type.sgml b/doc/src/sgml/ref/alter_type.sgml
index 915a1bd1ba..bde77b44f0 100644
--- a/doc/src/sgml/ref/alter_type.sgml
+++ b/doc/src/sgml/ref/alter_type.sgml
@@ -1,5 +1,5 @@
@@ -37,6 +37,17 @@ ALTER TYPE name SET SCHEMA
+
+
+ You must own the type to use ALTER TYPE>.
+ To change the schema of a type, you must also have
+ CREATE privilege on the new schema.
+ To alter the owner, you must also be a direct or indirect member of the new
+ owning role, and that role must have CREATE privilege on
+ the type's schema. (These restrictions enforce that altering the owner
+ doesn't do anything you couldn't do by dropping and recreating the type.
+ However, a superuser can alter ownership of any type anyway.)
+
@@ -59,7 +70,6 @@ ALTER TYPE name SET SCHEMA
The user name of the new owner of the type.
- You must be a superuser to change a type's owner.
@@ -68,9 +78,7 @@ ALTER TYPE name SET SCHEMA new_schema
- The new schema for the type. To move a
- type to a new schema, you must be the owner of the
- type and have CREATE> privilege on the new schema.
+ The new schema for the type.