<REFENTRY ID="SQL-DROPTYPE">
 <REFMETA>
  <REFENTRYTITLE>
   DROP TYPE
  </REFENTRYTITLE>
  <REFMISCINFO>SQL - Language Statements</REFMISCINFO>
 </REFMETA>
 <REFNAMEDIV>
  <REFNAME>
   DROP TYPE
  </REFNAME>
  <REFPURPOSE>
   Removes a user-defined type from the system catalogs
  </REFPURPOSE>
 <REFSYNOPSISDIV>
  <REFSYNOPSISDIVINFO>
   <DATE>1998-04-15</DATE>
  </REFSYNOPSISDIVINFO>
  <SYNOPSIS>
   DROP TYPE <REPLACEABLE CLASS="PARAMETER">typename</REPLACEABLE>
  </SYNOPSIS>
  
  <REFSECT2 ID="R2-SQL-DROPTYPE-1">
   <REFSECT2INFO>
    <DATE>1998-04-15</DATE>
   </REFSECT2INFO>
   <TITLE>
    Inputs
   </TITLE>
   <PARA>
   </PARA>
   <VARIABLELIST>
    <VARLISTENTRY>
     <TERM>
     </TERM>
     <LISTITEM>
      <PARA>
       <VARIABLELIST>
	<VARLISTENTRY>
	 <TERM>
	  <ReturnValue><REPLACEABLE CLASS="PARAMETER">typename</REPLACEABLE></ReturnValue>
	 </TERM>
	 <LISTITEM>
	  <PARA>
	   The name of an existing type.
	  </PARA>
	 </LISTITEM>
	</VARLISTENTRY>
       </variablelist>
     </LISTITEM>
    </VARLISTENTRY>
   </VARIABLELIST>
  </REFSECT2>
  
  <REFSECT2 ID="R2-SQL-DROPTYPE-2">
   <REFSECT2INFO>
    <DATE>1998-04-15</DATE>
   </REFSECT2INFO>
   <TITLE>
    Outputs
   </TITLE>
   <PARA>
   </PARA>
   <VARIABLELIST>
    <VARLISTENTRY>
     <TERM>
     </TERM>
     <LISTITEM>
      <PARA>
       <VARIABLELIST>
	<VARLISTENTRY>
	 <TERM>
	  <ReturnValue>DROP</ReturnValue>
	 </TERM>
	 <LISTITEM>
	  <PARA>
	   The message returned if the command is successful.
	  </PARA>
	 </LISTITEM>
	</VARLISTENTRY>
	<VARLISTENTRY>
	 <TERM>
	  <ReturnValue>ERROR:  RemoveType: type '<replaceable class="parameter">typename</replaceable>' does not exist</ReturnValue>
	 </TERM>
	 <LISTITEM>
	  <PARA>
           This message occurs if the specified type is not found.
	  </PARA>
	 </LISTITEM>
	</VARLISTENTRY>
       </variablelist>
     </LISTITEM>
    </VARLISTENTRY>
   </VARIABLELIST>
  </REFSECT2>
 </REFSYNOPSISDIV>
 
 <REFSECT1 ID="R1-SQL-DROPTYPE-1">
  <REFSECT1INFO>
   <DATE>1998-04-15</DATE>
  </REFSECT1INFO>
  <TITLE>
   Description
  </TITLE>
  <PARA>
   <command>DROP TYPE</command> will remove a user type from the
   system catalogs.
  </PARA>
  <PARA>
   Only the owner of a type can remove it.
  </PARA>
  
  <REFSECT2 ID="R2-SQL-DROPTYPE-3">
   <REFSECT2INFO>
    <DATE>1998-04-15</DATE>
   </REFSECT2INFO>
   <TITLE>
    Notes
   </TITLE>
   <PARA>
    DROP TYPE statement is a PostgreSQL language extension.
   </PARA>
   <PARA>
    Refer to the <command>CREATE TYPE</command> statement for
    inforamation on how to create types.
   </PARA>
   <PARA>
    It is the user's responsibility to remove any operators,
    functions, aggregates, access methods, subtypes, classes,
    and so on, that use a deleted type.
   </PARA>
  </refsect2>

  <REFSECT2 ID="R2-SQL-DROPTYPE-4">
   <REFSECT2INFO>
    <DATE>1998-04-15</DATE>
   </REFSECT2INFO>
   <TITLE>
    Bugs
   </TITLE>
   <PARA>
    If a built-in type is removed, the behavior of the backend
    is unpredictable.
   </PARA>
  </refsect2>
  
 <REFSECT1 ID="R1-SQL-DROPTYPE-2">
  <TITLE>
   Usage
  </TITLE>
  <PARA>
   To remove the <literal>box</literal> type:
  </PARA>
  <ProgramListing>
   DROP TYPE box
  </ProgramListing>
 </REFSECT1>
 
 <REFSECT1 ID="R1-SQL-DROPTYPE-3">
  <TITLE>
   Compatibility
  </TITLE>
  <PARA>
  </PARA>
  
  <REFSECT2 ID="R2-SQL-DROPTYPE-5">
   <REFSECT2INFO>
    <DATE>1998-04-15</DATE>
   </REFSECT2INFO>
   <TITLE>
    SQL3
   </TITLE>
   <PARA>
   DROP TYPE is a SQL3 statement.
   </PARA>
  </refsect2>
 </refsect1>
</REFENTRY>


<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
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:
-->
