1
<!-- doc/src/sgml/ref/drop_cast.sgml -->
3
<refentry id="SQL-DROPCAST">
5
<refentrytitle>DROP CAST</refentrytitle>
6
<manvolnum>7</manvolnum>
7
<refmiscinfo>SQL - Language Statements</refmiscinfo>
11
<refname>DROP CAST</refname>
12
<refpurpose>remove a cast</refpurpose>
15
<indexterm zone="sql-dropcast">
16
<primary>DROP CAST</primary>
21
DROP CAST [ IF EXISTS ] (<replaceable>source_type</replaceable> AS <replaceable>target_type</replaceable>) [ CASCADE | RESTRICT ]
25
<refsect1 id="sql-dropcast-description">
26
<title>Description</title>
29
<command>DROP CAST</command> removes a previously defined cast.
33
To be able to drop a cast, you must own the source or the target
34
data type. These are the same privileges that are required to
40
<title>Parameters</title>
45
<term><literal>IF EXISTS</literal></term>
48
Do not throw an error if the cast does not exist. A notice is issued
55
<term><replaceable>source_type</replaceable></term>
59
The name of the source data type of the cast.
65
<term><replaceable>target_type</replaceable></term>
69
The name of the target data type of the cast.
75
<term><literal>CASCADE</literal></term>
76
<term><literal>RESTRICT</literal></term>
80
These key words do not have any effect, since there are no
81
dependencies on casts.
88
<refsect1 id="sql-dropcast-examples">
89
<title>Examples</title>
92
To drop the cast from type <type>text</type> to type <type>int</type>:
94
DROP CAST (text AS int);
99
<refsect1 id="sql-dropcast-compat">
100
<title>Compatibility</title>
103
The <command>DROP CAST</command> command conforms to the SQL standard.
108
<title>See Also</title>
110
<simplelist type="inline">
111
<member><xref linkend="sql-createcast"></member>