]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_cast.sgml
Add support for piping COPY to/from an external program.
[postgresql] / doc / src / sgml / ref / drop_cast.sgml
1 <!-- doc/src/sgml/ref/drop_cast.sgml -->
2
3 <refentry id="SQL-DROPCAST">
4  <refmeta>
5   <refentrytitle>DROP CAST</refentrytitle>
6   <manvolnum>7</manvolnum>
7   <refmiscinfo>SQL - Language Statements</refmiscinfo>
8  </refmeta>
9
10  <refnamediv>
11   <refname>DROP CAST</refname>
12   <refpurpose>remove a cast</refpurpose>
13  </refnamediv>
14
15  <indexterm zone="sql-dropcast">
16   <primary>DROP CAST</primary>
17  </indexterm>
18
19  <refsynopsisdiv>
20 <synopsis>
21 DROP CAST [ IF EXISTS ] (<replaceable>source_type</replaceable> AS <replaceable>target_type</replaceable>) [ CASCADE | RESTRICT ]
22 </synopsis>
23  </refsynopsisdiv>
24
25  <refsect1 id="sql-dropcast-description">
26   <title>Description</title>
27
28   <para>
29    <command>DROP CAST</command> removes a previously defined cast.
30   </para>
31
32   <para>
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
35    create a cast.
36   </para>
37  </refsect1>
38
39  <refsect1>
40   <title>Parameters</title>
41
42    <variablelist>
43
44    <varlistentry>
45     <term><literal>IF EXISTS</literal></term>
46     <listitem>
47      <para>
48       Do not throw an error if the cast does not exist. A notice is issued
49       in this case.
50      </para>
51     </listitem>
52    </varlistentry>
53
54     <varlistentry>
55      <term><replaceable>source_type</replaceable></term>
56
57      <listitem>
58       <para>
59        The name of the source data type of the cast.
60       </para>
61      </listitem>
62     </varlistentry>
63
64     <varlistentry>
65      <term><replaceable>target_type</replaceable></term>
66
67      <listitem>
68       <para>
69        The name of the target data type of the cast.
70       </para>
71      </listitem>
72     </varlistentry>
73
74     <varlistentry>
75      <term><literal>CASCADE</literal></term>
76      <term><literal>RESTRICT</literal></term>
77
78      <listitem>
79       <para>
80        These key words do not have any effect, since there are no
81        dependencies on casts.
82       </para>
83      </listitem>
84     </varlistentry>
85    </variablelist>
86  </refsect1>
87
88  <refsect1 id="sql-dropcast-examples">
89   <title>Examples</title>
90
91   <para>
92    To drop the cast from type <type>text</type> to type <type>int</type>:
93 <programlisting>
94 DROP CAST (text AS int);
95 </programlisting></para>
96  </refsect1>
97
98  <refsect1 id="sql-dropcast-compat">
99   <title>Compatibility</title>
100
101   <para>
102    The <command>DROP CAST</command> command conforms to the SQL standard.
103   </para>
104  </refsect1>
105
106  <refsect1>
107   <title>See Also</title>
108
109   <simplelist type="inline">
110    <member><xref linkend="sql-createcast"></member>
111   </simplelist>
112  </refsect1>
113
114 </refentry>