doc: ALTER DEFAULT PRIVILEGES does not affect inherited roles
[pgsql.git] / doc / src / sgml / ref / drop_domain.sgml
blobb18faf391752d5f9aeb4fbef41fe2fb607148820
1 <!--
2 doc/src/sgml/ref/drop_domain.sgml
3 PostgreSQL documentation
4 -->
6 <refentry id="sql-dropdomain">
7 <indexterm zone="sql-dropdomain">
8 <primary>DROP DOMAIN</primary>
9 </indexterm>
11 <refmeta>
12 <refentrytitle>DROP DOMAIN</refentrytitle>
13 <manvolnum>7</manvolnum>
14 <refmiscinfo>SQL - Language Statements</refmiscinfo>
15 </refmeta>
17 <refnamediv>
18 <refname>DROP DOMAIN</refname>
19 <refpurpose>remove a domain</refpurpose>
20 </refnamediv>
22 <refsynopsisdiv>
23 <synopsis>
24 DROP DOMAIN [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
25 </synopsis>
26 </refsynopsisdiv>
28 <refsect1>
29 <title>Description</title>
31 <para>
32 <command>DROP DOMAIN</command> removes a domain. Only the owner of
33 a domain can remove it.
34 </para>
35 </refsect1>
37 <refsect1>
38 <title>Parameters</title>
40 <variablelist>
41 <varlistentry>
42 <term><literal>IF EXISTS</literal></term>
43 <listitem>
44 <para>
45 Do not throw an error if the domain does not exist. A notice is issued
46 in this case.
47 </para>
48 </listitem>
49 </varlistentry>
51 <varlistentry>
52 <term><replaceable class="parameter">name</replaceable></term>
53 <listitem>
54 <para>
55 The name (optionally schema-qualified) of an existing domain.
56 </para>
57 </listitem>
58 </varlistentry>
60 <varlistentry>
61 <term><literal>CASCADE</literal></term>
62 <listitem>
63 <para>
64 Automatically drop objects that depend on the domain (such as
65 table columns),
66 and in turn all objects that depend on those objects
67 (see <xref linkend="ddl-depend"/>).
68 </para>
69 </listitem>
70 </varlistentry>
72 <varlistentry>
73 <term><literal>RESTRICT</literal></term>
74 <listitem>
75 <para>
76 Refuse to drop the domain if any objects depend on it. This is
77 the default.
78 </para>
79 </listitem>
80 </varlistentry>
81 </variablelist>
82 </refsect1>
84 <refsect1 id="sql-dropdomain-examples">
85 <title>Examples</title>
87 <para>
88 To remove the domain <type>box</type>:
90 <programlisting>
91 DROP DOMAIN box;
92 </programlisting></para>
93 </refsect1>
95 <refsect1 id="sql-dropdomain-compatibility">
96 <title>Compatibility</title>
98 <para>
99 This command conforms to the SQL standard, except for the
100 <literal>IF EXISTS</literal> option, which is a <productname>PostgreSQL</productname>
101 extension.
102 </para>
103 </refsect1>
105 <refsect1 id="sql-dropdomain-see-also">
106 <title>See Also</title>
108 <simplelist type="inline">
109 <member><xref linkend="sql-createdomain"/></member>
110 <member><xref linkend="sql-alterdomain"/></member>
111 </simplelist>
112 </refsect1>
114 </refentry>