Make LC_COLLATE and LC_CTYPE database-level settings. Collation and
[PostgreSQL.git] / doc / src / sgml / ref / drop_domain.sgml
blob401cf3fbbd361476f7881e8333b624a1122175f0
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
6 <refentry id="SQL-DROPDOMAIN">
7 <refmeta>
8 <refentrytitle id="SQL-DROPDOMAIN-TITLE">DROP DOMAIN</refentrytitle>
9 <refmiscinfo>SQL - Language Statements</refmiscinfo>
10 </refmeta>
12 <refnamediv>
13 <refname>DROP DOMAIN</refname>
14 <refpurpose>remove a domain</refpurpose>
15 </refnamediv>
17 <indexterm zone="sql-dropdomain">
18 <primary>DROP DOMAIN</primary>
19 </indexterm>
21 <refsynopsisdiv>
22 <synopsis>
23 DROP DOMAIN [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
24 </synopsis>
25 </refsynopsisdiv>
27 <refsect1>
28 <title>Description</title>
30 <para>
31 <command>DROP DOMAIN</command> removes a domain. Only the owner of
32 a domain can remove it.
33 </para>
34 </refsect1>
36 <refsect1>
37 <title>Parameters</title>
39 <variablelist>
40 <varlistentry>
41 <term><literal>IF EXISTS</literal></term>
42 <listitem>
43 <para>
44 Do not throw an error if the domain does not exist. A notice is issued
45 in this case.
46 </para>
47 </listitem>
48 </varlistentry>
50 <varlistentry>
51 <term><replaceable class="PARAMETER">name</replaceable></term>
52 <listitem>
53 <para>
54 The name (optionally schema-qualified) of an existing domain.
55 </para>
56 </listitem>
57 </varlistentry>
59 <varlistentry>
60 <term><literal>CASCADE</></term>
61 <listitem>
62 <para>
63 Automatically drop objects that depend on the domain (such as
64 table columns).
65 </para>
66 </listitem>
67 </varlistentry>
69 <varlistentry>
70 <term><literal>RESTRICT</></term>
71 <listitem>
72 <para>
73 Refuse to drop the domain if any objects depend on it. This is
74 the default.
75 </para>
76 </listitem>
77 </varlistentry>
78 </variablelist>
79 </refsect1>
81 <refsect1 id="SQL-DROPDOMAIN-examples">
82 <title>Examples</title>
84 <para>
85 To remove the domain <type>box</type>:
87 <programlisting>
88 DROP DOMAIN box;
89 </programlisting>
90 </para>
91 </refsect1>
93 <refsect1 id="SQL-DROPDOMAIN-compatibility">
94 <title>Compatibility</title>
96 <para>
97 This command conforms to the SQL standard, except for the
98 <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</>
99 extension.
100 </para>
101 </refsect1>
103 <refsect1 id="SQL-DROPDOMAIN-see-also">
104 <title>See Also</title>
106 <simplelist type="inline">
107 <member><xref linkend="sql-createdomain" endterm="sql-createdomain-title"></member>
108 <member><xref linkend="sql-alterdomain" endterm="sql-alterdomain-title"></member>
109 </simplelist>
110 </refsect1>
112 </refentry>