head	1.11;
access;
symbols
	REL9_0_0:1.11
	REL9_1_ALPHA1:1.11
	REL9_0_RC1:1.11
	REL9_0_BETA4:1.11
	REL9_0_STABLE:1.11.0.2
	REL9_0_BETA3:1.11
	REL9_0_BETA2:1.11
	REL7_4_29:1.5
	REL8_0_25:1.6
	REL8_1_21:1.6
	REL8_2_17:1.8
	REL8_3_11:1.8
	REL8_4_4:1.9
	REL9_0_BETA1:1.11
	REL9_0_ALPHA5_BRANCH:1.10.0.8
	REL9_0_ALPHA5:1.10
	REL7_4_28:1.5
	REL8_0_24:1.6
	REL8_1_20:1.6
	REL8_2_16:1.8
	REL8_3_10:1.8
	REL8_4_3:1.9
	REL9_0_ALPHA4:1.10
	REL9_0_ALPHA4_BRANCH:1.10.0.6
	REL8_5_ALPHA3:1.10
	REL8_5_ALPHA3_BRANCH:1.10.0.4
	REL7_4_27:1.5
	REL8_0_23:1.6
	REL8_1_19:1.6
	REL8_2_15:1.8
	REL8_3_9:1.8
	REL8_4_2:1.9
	REL8_5_ALPHA2:1.10
	REL8_5_ALPHA2_BRANCH:1.10.0.2
	REL7_4_26:1.5
	REL8_0_22:1.6
	REL8_1_18:1.6
	REL8_2_14:1.8
	REL8_3_8:1.8
	REL8_4_1:1.9
	REL8_5_ALPHA1:1.9
	REL8_5_ALPHA1_BRANCH:1.9.0.4
	REL8_4_STABLE:1.9.0.2
	REL8_4_0:1.9
	REL8_4_RC2:1.9
	REL8_4_RC1:1.9
	REL8_4_BETA2:1.9
	REL8_4_BETA1:1.9
	REL7_4_25:1.5
	REL8_0_21:1.6
	REL8_1_17:1.6
	REL8_2_13:1.8
	REL8_3_7:1.8
	REL7_4_24:1.5
	REL8_0_20:1.6
	REL8_1_16:1.6
	REL8_2_12:1.8
	REL8_3_6:1.8
	REL7_4_23:1.5
	REL8_0_19:1.6
	REL8_1_15:1.6
	REL8_2_11:1.8
	REL8_3_5:1.8
	REL7_4_22:1.5
	REL8_0_18:1.6
	REL8_1_14:1.6
	REL8_2_10:1.8
	REL8_3_4:1.8
	REL7_4_21:1.5
	REL8_0_17:1.6
	REL8_1_13:1.6
	REL8_2_9:1.8
	REL8_3_3:1.8
	REL7_4_20:1.5
	REL8_0_16:1.6
	REL8_1_12:1.6
	REL8_2_8:1.8
	REL8_3_2:1.8
	REL8_2_7:1.8
	REL8_3_1:1.8
	REL8_3_STABLE:1.8.0.4
	REL8_3_0:1.8
	REL8_3_RC2:1.8
	REL7_3_21:1.2
	REL7_4_19:1.5
	REL8_0_15:1.6
	REL8_1_11:1.6
	REL8_2_6:1.8
	REL8_3_RC1:1.8
	REL8_3_BETA4:1.8
	REL8_3_BETA3:1.8
	REL8_3_BETA2:1.8
	REL8_3_BETA1:1.8
	REL7_3_20:1.2
	REL7_4_18:1.5
	REL8_0_14:1.6
	REL8_1_10:1.6
	REL8_2_5:1.8
	REL7_3_19:1.2
	REL7_4_17:1.5
	REL8_0_13:1.6
	REL8_1_9:1.6
	REL8_2_4:1.8
	REL8_0_12:1.6
	REL8_1_8:1.6
	REL8_2_3:1.8
	REL7_3_18:1.2
	REL7_4_16:1.5
	REL8_0_11:1.6
	REL8_1_7:1.6
	REL8_2_2:1.8
	REL8_0_10:1.6
	REL8_1_6:1.6
	REL8_2_1:1.8
	REL7_4_15:1.5
	REL7_3_17:1.2
	REL8_2_STABLE:1.8.0.2
	REL8_2_0:1.8
	REL8_2_RC1:1.8
	REL8_2_BETA3:1.8
	REL8_2_BETA2:1.8
	REL8_1_5:1.6
	REL8_0_9:1.6
	REL7_4_14:1.5
	REL7_3_16:1.2
	REL8_2_BETA1:1.8
	REL7_3_15:1.2
	REL7_4_13:1.5
	REL8_0_8:1.6
	REL8_1_4:1.6
	REL7_3_14:1.2
	REL7_4_12:1.5
	REL8_0_7:1.6
	REL8_1_3:1.6
	REL7_3_13:1.2
	REL7_4_11:1.5
	REL8_0_6:1.6
	REL8_1_2:1.6
	REL7_3_12:1.2
	REL7_4_10:1.5
	REL8_0_5:1.6
	REL8_1_1:1.6
	REL8_1_STABLE:1.6.0.6
	REL8_1_0:1.6
	REL8_1_0RC1:1.6
	REL8_1_0BETA4:1.6
	REL8_1_0BETA3:1.6
	REL7_3_11:1.2
	REL7_4_9:1.5
	REL8_0_4:1.6
	REL8_1_0BETA2:1.6
	REL8_1_0BETA1:1.6
	REL7_3_10:1.2
	REL7_4_8:1.5
	REL8_0_3:1.6
	REL8_0_2:1.6
	REL7_3_9:1.2
	REL7_4_7:1.5
	REL8_0_1:1.6
	REL8_0_STABLE:1.6.0.4
	REL8_0_0:1.6.0.2
	REL8_0_0RC5:1.6
	REL8_0_0RC4:1.6
	REL8_0_0RC3:1.6
	REL8_0_0RC2:1.6
	REL8_0_0RC1:1.6
	REL8_0_0BETA5:1.6
	REL8_0_0BETA4:1.6
	REL7_4_6:1.5
	REL7_3_8:1.2
	REL8_0_0BETA3:1.6
	REL8_0_0BETA2:1.6
	REL7_4_5:1.5
	REL7_3_7:1.2
	REL7_4_4:1.5
	REL8_0_0BETA1:1.6
	REL7_4_3:1.5
	REL7_4_2:1.5
	REL7_3_6:1.2
	REL7_4_1:1.5
	REL7_3_5:1.2
	REL7_4:1.5
	REL7_4_RC2:1.5
	REL7_4_STABLE:1.5.0.2
	REL7_4_RC1:1.5
	REL7_4_BETA5:1.5
	REL7_4_BETA4:1.5
	REL7_4_BETA3:1.4
	REL7_4_BETA2:1.3
	WIN32_DEV:1.3.0.2
	REL7_4_BETA1:1.3
	REL7_3_4:1.2
	REL7_3_2:1.2
	REL7_3_STABLE:1.2.0.2;
locks; strict;
comment	@# @;


1.11
date	2010.04.03.07.23.00;	author petere;	state Exp;
branches;
next	1.10;

1.10
date	2009.09.19.10.23.27;	author petere;	state Exp;
branches;
next	1.9;

1.9
date	2008.11.14.10.22.46;	author petere;	state Exp;
branches;
next	1.8;

1.8
date	2006.09.16.00.30.18;	author momjian;	state Exp;
branches;
next	1.7;

1.7
date	2006.06.16.22.27.55;	author adunstan;	state Exp;
branches;
next	1.6;

1.6
date	2003.11.29.19.51.38;	author pgsql;	state Exp;
branches;
next	1.5;

1.5
date	2003.09.22.00.16.58;	author petere;	state Exp;
branches;
next	1.4;

1.4
date	2003.08.31.17.32.22;	author petere;	state Exp;
branches;
next	1.3;

1.3
date	2003.05.04.02.23.16;	author petere;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2002.08.11.17.44.12;	author petere;	state Exp;
branches;
next	1.1;

1.1
date	2002.07.18.23.11.27;	author petere;	state Exp;
branches;
next	;

1.3.2.1
date	2003.09.07.04.36.45;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.11
log
@Remove unnecessary xref endterm attributes and title ids

The endterm attribute is mainly useful when the toolchain does not support
automatic link target text generation for a particular situation.  In  the
past, this was required by the man page tools for all reference page links,
but that is no longer the case, and it now actually gets in the way of
proper automatic link text generation.  The only remaining use cases are
currently xrefs to refsects.
@
text
@<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/drop_cast.sgml,v 1.10 2009/09/19 10:23:27 petere Exp $ -->

<refentry id="SQL-DROPCAST">
 <refmeta>
  <refentrytitle>DROP CAST</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>DROP CAST</refname>
  <refpurpose>remove a cast</refpurpose>
 </refnamediv>

 <indexterm zone="sql-dropcast">
  <primary>DROP CAST</primary>
 </indexterm>

 <refsynopsisdiv>
<synopsis>
DROP CAST [ IF EXISTS ] (<replaceable>source_type</replaceable> AS <replaceable>target_type</replaceable>) [ CASCADE | RESTRICT ]
</synopsis>
 </refsynopsisdiv>
  
 <refsect1 id="sql-dropcast-description">
  <title>Description</title>

  <para>
   <command>DROP CAST</command> removes a previously defined cast.
  </para>

  <para>
   To be able to drop a cast, you must own the source or the target
   data type.  These are the same privileges that are required to
   create a cast.
  </para>
 </refsect1>

 <refsect1>
  <title>Parameters</title>

   <variablelist>

   <varlistentry>
    <term><literal>IF EXISTS</literal></term>
    <listitem>
     <para>
      Do not throw an error if the cast does not exist. A notice is issued 
      in this case.
     </para>
    </listitem>
   </varlistentry>

    <varlistentry>
     <term><replaceable>source_type</replaceable></term>

     <listitem>
      <para>
       The name of the source data type of the cast.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable>target_type</replaceable></term>

     <listitem>
      <para>
       The name of the target data type of the cast.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><literal>CASCADE</literal></term>
     <term><literal>RESTRICT</literal></term>

     <listitem>
      <para>
       These key words do not have any effect, since there are no
       dependencies on casts.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
 </refsect1>

 <refsect1 id="sql-dropcast-examples">
  <title>Examples</title>

  <para>
   To drop the cast from type <type>text</type> to type <type>int</type>:
<programlisting>
DROP CAST (text AS int);
</programlisting>
  </para>
 </refsect1>
 
 <refsect1 id="sql-dropcast-compat">
  <title>Compatibility</title>

  <para>
   The <command>DROP CAST</command> command conforms to the SQL standard.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-createcast"></member>
  </simplelist>
 </refsect1>

</refentry>
@


1.10
log
@Make the placeholder naming in the synopses of the SQL help more consistent
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/drop_cast.sgml,v 1.9 2008/11/14 10:22:46 petere Exp $ -->
d5 1
a5 1
  <refentrytitle id="SQL-DROPCAST-TITLE">DROP CAST</refentrytitle>
d111 1
a111 1
   <member><xref linkend="sql-createcast" endterm="sql-createcast-title"></member>
@


1.9
log
@Set SQL man pages to be section 7 by default, and only transform them to
another section if required by the platform (instead of the old way of
building them in section "l" and always transforming them to the
platform-specific section).

This speeds up the installation on common platforms, and it avoids some
funny business with the man page tools and build process.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/drop_cast.sgml,v 1.8 2006/09/16 00:30:18 momjian Exp $ -->
d21 1
a21 1
DROP CAST [ IF EXISTS ] (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</replaceable>) [ CASCADE | RESTRICT ]
d55 1
a55 1
     <term><replaceable>sourcetype</replaceable></term>
d65 1
a65 1
     <term><replaceable>targettype</replaceable></term>
@


1.8
log
@Remove emacs info from footer of SGML files.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/drop_cast.sgml,v 1.7 2006/06/16 22:27:55 adunstan Exp $ -->
d6 1
@


1.7
log
@
docs for DROP ... IF EXISTS for the following cases:
  language, tablespace, trigger, rule, opclass, function, aggregate. operator, and cast.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/drop_cast.sgml,v 1.6 2003/11/29 19:51:38 pgsql Exp $ -->
a114 17

<!-- 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:
-->
@


1.6
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d1 1
a1 1
<!-- $PostgreSQL: /cvsroot/pgsql-server/doc/src/sgml/ref/drop_cast.sgml,v 1.5 2003/09/22 00:16:58 petere Exp $ -->
d20 1
a20 1
DROP CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</replaceable>) [ CASCADE | RESTRICT ]
d42 11
@


1.5
log
@Make the SQL command synopses appear less random.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/drop_cast.sgml,v 1.4 2003/08/31 17:32:22 petere Exp $ -->
@


1.4
log
@Add/edit index entries.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/drop_cast.sgml,v 1.3 2003/05/04 02:23:16 petere Exp $ -->
d11 1
a11 1
  <refpurpose>remove a user-defined cast</refpurpose>
@


1.3
log
@Last round of reference page editing.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/drop_cast.sgml,v 1.2 2002/08/11 17:44:12 petere Exp $ -->
d13 4
@


1.3.2.1
log
@Update this branch to match CVS head, includes WIN32 improvements.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/drop_cast.sgml,v 1.4 2003/08/31 17:32:22 petere Exp $ -->
a12 4

 <indexterm zone="sql-dropcast">
  <primary>DROP CAST</primary>
 </indexterm>
@


1.2
log
@Create/drop cast now requires ownership of at least one of the types.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/drop_cast.sgml,v 1.1 2002/07/18 23:11:27 petere Exp $ -->
d16 1
a16 2
DROP CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</replaceable>)
    [ CASCADE | RESTRICT ]
d32 4
a37 2
    <title>Parameters</title>

a69 9

 </refsect1>

 <refsect1 id="sql-dropcast-notes">
  <title>Notes</title>

  <para>
   Use <command>CREATE CAST</command> to create user-defined casts.
  </para>
a71 1

d78 1
a78 1
DROP CAST (text AS int4);
a81 1

d87 1
a87 1
   The <command>DROP CAST</command> command conforms to SQL99.
d91 1
a91 2

 <refsect1 id="sql-dropcast-seealso">
d94 3
a96 3
  <para>
   <xref linkend="sql-createcast" endterm="sql-createcast-title">
  </para>
@


1.1
log
@pg_cast table, and standards-compliant CREATE/DROP CAST commands, plus
extension to create binary compatible casts.  Includes dependency tracking
as well.

pg_proc.proimplicit is now defunct, but will be removed in a separate
commit.

pg_dump provides a migration path from the previous scheme to declare
casts.  Dumping binary compatible casts is currently impossible, though.
@
text
@d1 1
a1 1
<!-- $Header$ -->
d29 3
a31 4
   To be able to drop a cast, you must own the underlying function.
   To be able to drop a binary compatible cast, you must own both the
   source and the target data type.  These are the same privileges
   that are required to create a cast.
a76 5
  </para>

  <para>
   The privileges required to drop a cast may be changed in a future
   release.
@
