1<!--
2doc/src/sgml/ref/drop_transform.sgml
3PostgreSQL documentation
4-->
5
6<refentry id="SQL-DROPTRANSFORM">
7 <indexterm zone="sql-droptransform">
8  <primary>DROP TRANSFORM</primary>
9 </indexterm>
10
11 <refmeta>
12  <refentrytitle>DROP TRANSFORM</refentrytitle>
13  <manvolnum>7</manvolnum>
14  <refmiscinfo>SQL - Language Statements</refmiscinfo>
15 </refmeta>
16
17 <refnamediv>
18  <refname>DROP TRANSFORM</refname>
19  <refpurpose>remove a transform</refpurpose>
20 </refnamediv>
21
22 <refsynopsisdiv>
23<synopsis>
24DROP TRANSFORM [ IF EXISTS ] FOR <replaceable>type_name</replaceable> LANGUAGE <replaceable>lang_name</replaceable> [ CASCADE | RESTRICT ]
25</synopsis>
26 </refsynopsisdiv>
27
28 <refsect1 id="sql-droptransform-description">
29  <title>Description</title>
30
31  <para>
32   <command>DROP TRANSFORM</command> removes a previously defined transform.
33  </para>
34
35  <para>
36   To be able to drop a transform, you must own the type and the language.
37   These are the same privileges that are required to create a transform.
38  </para>
39 </refsect1>
40
41 <refsect1>
42  <title>Parameters</title>
43
44   <variablelist>
45
46   <varlistentry>
47    <term><literal>IF EXISTS</literal></term>
48    <listitem>
49     <para>
50      Do not throw an error if the transform does not exist. A notice is issued
51      in this case.
52     </para>
53    </listitem>
54   </varlistentry>
55
56    <varlistentry>
57     <term><replaceable>type_name</replaceable></term>
58
59     <listitem>
60      <para>
61       The name of the data type of the transform.
62      </para>
63     </listitem>
64    </varlistentry>
65
66    <varlistentry>
67     <term><replaceable>lang_name</replaceable></term>
68
69     <listitem>
70      <para>
71       The name of the language of the transform.
72      </para>
73     </listitem>
74    </varlistentry>
75
76    <varlistentry>
77     <term><literal>CASCADE</literal></term>
78     <listitem>
79      <para>
80       Automatically drop objects that depend on the transform,
81       and in turn all objects that depend on those objects
82       (see <xref linkend="ddl-depend">).
83      </para>
84     </listitem>
85    </varlistentry>
86
87    <varlistentry>
88     <term><literal>RESTRICT</literal></term>
89     <listitem>
90      <para>
91       Refuse to drop the transform if any objects depend on it.  This is the
92       default.
93      </para>
94     </listitem>
95    </varlistentry>
96   </variablelist>
97 </refsect1>
98
99 <refsect1 id="sql-droptransform-examples">
100  <title>Examples</title>
101
102  <para>
103   To drop the transform for type <type>hstore</type> and language
104   <literal>plpythonu</literal>:
105<programlisting>
106DROP TRANSFORM FOR hstore LANGUAGE plpythonu;
107</programlisting></para>
108 </refsect1>
109
110 <refsect1 id="sql-droptransform-compat">
111  <title>Compatibility</title>
112
113  <para>
114   This form of <command>DROP TRANSFORM</command> is a
115   <productname>PostgreSQL</productname> extension.  See <xref
116   linkend="sql-createtransform"> for details.
117  </para>
118 </refsect1>
119
120 <refsect1>
121  <title>See Also</title>
122
123  <simplelist type="inline">
124   <member><xref linkend="sql-createtransform"></member>
125  </simplelist>
126 </refsect1>
127
128</refentry>
129