<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_type.sgml,v 1.1 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->

<refentry id="SQL-ALTERTYPE">
 <refmeta>
  <refentrytitle id="sql-altertype-title">ALTER TYPE</refentrytitle>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>
   ALTER TYPE
  </refname>
  <refpurpose>
   change the definition of a type
  </refpurpose>
 </refnamediv>

 <indexterm zone="sql-altertype">
  <primary>ALTER TYPE</primary>
 </indexterm>

 <refsynopsisdiv>
  <synopsis>
ALTER TYPE <replaceable class="PARAMETER">name</replaceable> OWNER TO <replaceable class="PARAMETER">new_owner</replaceable> 
  </synopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

  <para>
   <command>ALTER TYPE</command> changes the definition of an existing type.
   The only currently available capability is changing the owner of a type.
  </para>
 </refsect1>

 <refsect1>
  <title>Parameters</title>

   <para>
    <variablelist>
     <varlistentry>
      <term><replaceable class="PARAMETER">name</replaceable></term>
      <listitem>
       <para>
        The name (possibly schema-qualified) of an existing type to
        alter.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><replaceable class="PARAMETER">new_owner</replaceable></term>
      <listitem>
       <para>
        The user name of the new owner of the type.
        You must be a superuser to change a type's owner.
       </para>
      </listitem>
     </varlistentry>

    </variablelist>
   </para>
  </refsect1>

 <refsect1>
  <title>Examples</title>

  <para> 
   To change the owner of the user-defined type <literal>email</literal>
   to <literal>joe</literal>:
   <programlisting>
ALTER TYPE email OWNER TO joe;
   </programlisting>
  </para>
 </refsect1>

 <refsect1>
  <title>Compatibility</title>
    
  <para>
   There is no <command>ALTER TYPE</command> statement in the SQL
   standard.
  </para>
 </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
