doc: ALTER DEFAULT PRIVILEGES does not affect inherited roles
[pgsql.git] / doc / src / sgml / ref / drop_language.sgml
blob8ba6621bc4af2855276a936947ea8cecae5aebcc
1 <!--
2 doc/src/sgml/ref/drop_language.sgml
3 PostgreSQL documentation
4 -->
6 <refentry id="sql-droplanguage">
7 <indexterm zone="sql-droplanguage">
8 <primary>DROP LANGUAGE</primary>
9 </indexterm>
11 <refmeta>
12 <refentrytitle>DROP LANGUAGE</refentrytitle>
13 <manvolnum>7</manvolnum>
14 <refmiscinfo>SQL - Language Statements</refmiscinfo>
15 </refmeta>
17 <refnamediv>
18 <refname>DROP LANGUAGE</refname>
19 <refpurpose>remove a procedural language</refpurpose>
20 </refnamediv>
22 <refsynopsisdiv>
23 <synopsis>
24 DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ CASCADE | RESTRICT ]
25 </synopsis>
26 </refsynopsisdiv>
28 <refsect1>
29 <title>Description</title>
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</command>.
35 </para>
37 <note>
38 <para>
39 As of <productname>PostgreSQL</productname> 9.1, most procedural
40 languages have been made into <quote>extensions</quote>, and should
41 therefore be removed with <link linkend="sql-dropextension"><command>DROP EXTENSION</command></link>
42 not <command>DROP LANGUAGE</command>.
43 </para>
44 </note>
45 </refsect1>
47 <refsect1>
48 <title>Parameters</title>
50 <variablelist>
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>
62 <varlistentry>
63 <term><replaceable class="parameter">name</replaceable></term>
64 <listitem>
65 <para>
66 The name of an existing procedural language.
67 </para>
68 </listitem>
69 </varlistentry>
71 <varlistentry>
72 <term><literal>CASCADE</literal></term>
73 <listitem>
74 <para>
75 Automatically drop objects that depend on the language (such as
76 functions in the language),
77 and in turn all objects that depend on those objects
78 (see <xref linkend="ddl-depend"/>).
79 </para>
80 </listitem>
81 </varlistentry>
83 <varlistentry>
84 <term><literal>RESTRICT</literal></term>
85 <listitem>
86 <para>
87 Refuse to drop the language if any objects depend on it. This
88 is the default.
89 </para>
90 </listitem>
91 </varlistentry>
92 </variablelist>
93 </refsect1>
95 <refsect1>
96 <title>Examples</title>
98 <para>
99 This command removes the procedural language
100 <literal>plsample</literal>:
102 <programlisting>
103 DROP LANGUAGE plsample;
104 </programlisting></para>
105 </refsect1>
107 <refsect1>
108 <title>Compatibility</title>
110 <para>
111 There is no <command>DROP LANGUAGE</command> statement in the SQL
112 standard.
113 </para>
114 </refsect1>
116 <refsect1>
117 <title>See Also</title>
119 <simplelist type="inline">
120 <member><xref linkend="sql-alterlanguage"/></member>
121 <member><xref linkend="sql-createlanguage"/></member>
122 </simplelist>
123 </refsect1>
125 </refentry>