Debian Codegraph @

doc/src/sgml/ref/drop_collation.sgml

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