]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_language.sgml
Create a "sort support" interface API for faster sorting.
[postgresql] / doc / src / sgml / ref / drop_language.sgml
1 <!--
2 doc/src/sgml/ref/drop_language.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-DROPLANGUAGE">
7  <refmeta>
8   <refentrytitle>DROP LANGUAGE</refentrytitle>
9   <manvolnum>7</manvolnum>
10   <refmiscinfo>SQL - Language Statements</refmiscinfo>
11  </refmeta>
12
13  <refnamediv>
14   <refname>DROP LANGUAGE</refname>
15   <refpurpose>remove a procedural language</refpurpose>
16  </refnamediv>
17
18  <indexterm zone="sql-droplanguage">
19   <primary>DROP LANGUAGE</primary>
20  </indexterm>
21
22  <refsynopsisdiv>
23 <synopsis>
24 DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [ CASCADE | RESTRICT ]
25 </synopsis>
26  </refsynopsisdiv>
27
28  <refsect1>
29   <title>Description</title>
30
31   <para>
32    <command>DROP LANGUAGE</command> removes the definition of a
33    previously registered procedural language.  You must be a superuser
34    or the owner of the language to use <command>DROP LANGUAGE</>.
35   </para>
36
37   <note>
38    <para>
39     As of <productname>PostgreSQL</productname> 9.1, most procedural
40     languages have been made into <quote>extensions</>, and should
41     therefore be removed with <xref linkend="sql-dropextension">
42     not <command>DROP LANGUAGE</command>.
43    </para>
44   </note>
45  </refsect1>
46
47  <refsect1>
48   <title>Parameters</title>
49
50   <variablelist>
51
52    <varlistentry>
53     <term><literal>IF EXISTS</literal></term>
54     <listitem>
55      <para>
56       Do not throw an error if the language does not exist. A notice is issued
57       in this case.
58      </para>
59     </listitem>
60    </varlistentry>
61
62    <varlistentry>
63     <term><replaceable class="PARAMETER">name</replaceable></term>
64     <listitem>
65      <para>
66       The name of an existing procedural language.  For backward
67       compatibility, the name can be enclosed by single quotes.
68      </para>
69     </listitem>
70    </varlistentry>
71
72    <varlistentry>
73     <term><literal>CASCADE</literal></term>
74     <listitem>
75      <para>
76       Automatically drop objects that depend on the language (such as
77       functions in the language).
78      </para>
79     </listitem>
80    </varlistentry>
81
82    <varlistentry>
83     <term><literal>RESTRICT</literal></term>
84     <listitem>
85      <para>
86       Refuse to drop the language if any objects depend on it.  This
87       is the default.
88      </para>
89     </listitem>
90    </varlistentry>
91   </variablelist>
92  </refsect1>
93
94  <refsect1>
95   <title>Examples</title>
96
97   <para>
98    This command removes the procedural language
99    <literal>plsample</literal>:
100
101 <programlisting>
102 DROP LANGUAGE plsample;
103 </programlisting></para>
104  </refsect1>
105
106  <refsect1>
107   <title>Compatibility</title>
108
109   <para>
110    There is no <command>DROP LANGUAGE</command> statement in the SQL
111    standard.
112   </para>
113  </refsect1>
114
115  <refsect1>
116   <title>See Also</title>
117
118   <simplelist type="inline">
119    <member><xref linkend="sql-alterlanguage"></member>
120    <member><xref linkend="sql-createlanguage"></member>
121    <member><xref linkend="app-droplang"></member>
122   </simplelist>
123  </refsect1>
124
125 </refentry>