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 $
33PostgreSQL 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