2010-09-20 22:08:53 +02:00
|
|
|
<!-- doc/src/sgml/ref/drop_cast.sgml -->
|
2002-07-19 01:11:32 +02:00
|
|
|
|
|
|
|
<refentry id="SQL-DROPCAST">
|
2014-02-24 03:25:35 +01:00
|
|
|
<indexterm zone="sql-dropcast">
|
|
|
|
<primary>DROP CAST</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
2002-07-19 01:11:32 +02:00
|
|
|
<refmeta>
|
2010-04-03 09:23:02 +02:00
|
|
|
<refentrytitle>DROP CAST</refentrytitle>
|
2008-11-14 11:22:48 +01:00
|
|
|
<manvolnum>7</manvolnum>
|
2002-07-19 01:11:32 +02:00
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>DROP CAST</refname>
|
2003-09-22 02:16:58 +02:00
|
|
|
<refpurpose>remove a cast</refpurpose>
|
2002-07-19 01:11:32 +02:00
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<synopsis>
|
2009-09-19 12:23:27 +02:00
|
|
|
DROP CAST [ IF EXISTS ] (<replaceable>source_type</replaceable> AS <replaceable>target_type</replaceable>) [ CASCADE | RESTRICT ]
|
2002-07-19 01:11:32 +02:00
|
|
|
</synopsis>
|
|
|
|
</refsynopsisdiv>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2002-07-19 01:11:32 +02:00
|
|
|
<refsect1 id="sql-dropcast-description">
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>DROP CAST</command> removes a previously defined cast.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2002-08-11 19:44:12 +02:00
|
|
|
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.
|
2002-07-19 01:11:32 +02:00
|
|
|
</para>
|
2003-05-04 04:23:16 +02:00
|
|
|
</refsect1>
|
2002-07-19 01:11:32 +02:00
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Parameters</title>
|
2002-07-19 01:11:32 +02:00
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<variablelist>
|
2006-06-17 00:27:55 +02:00
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><literal>IF EXISTS</literal></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2010-11-23 21:27:50 +01:00
|
|
|
Do not throw an error if the cast does not exist. A notice is issued
|
2006-06-17 00:27:55 +02:00
|
|
|
in this case.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2002-07-19 01:11:32 +02:00
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable>source_type</replaceable></term>
|
2002-07-19 01:11:32 +02:00
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name of the source data type of the cast.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable>target_type</replaceable></term>
|
2002-07-19 01:11:32 +02:00
|
|
|
|
|
|
|
<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>
|
2003-05-04 04:23:16 +02:00
|
|
|
DROP CAST (text AS int);
|
2011-08-07 09:49:45 +02:00
|
|
|
</programlisting></para>
|
2002-07-19 01:11:32 +02:00
|
|
|
</refsect1>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2002-07-19 01:11:32 +02:00
|
|
|
<refsect1 id="sql-dropcast-compat">
|
|
|
|
<title>Compatibility</title>
|
|
|
|
|
|
|
|
<para>
|
2003-05-04 04:23:16 +02:00
|
|
|
The <command>DROP CAST</command> command conforms to the SQL standard.
|
2002-07-19 01:11:32 +02:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<refsect1>
|
2002-07-19 01:11:32 +02:00
|
|
|
<title>See Also</title>
|
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<simplelist type="inline">
|
2010-04-03 09:23:02 +02:00
|
|
|
<member><xref linkend="sql-createcast"></member>
|
2003-05-04 04:23:16 +02:00
|
|
|
</simplelist>
|
2002-07-19 01:11:32 +02:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
</refentry>
|