]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_domain.sgml
Ok. Updated patch attached.
[postgresql] / doc / src / sgml / ref / drop_domain.sgml
1 <!--
2 $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_domain.sgml,v 1.1 2002/03/06 20:34:44 momjian Exp $
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-DROPDOMAIN">
7  <refmeta>
8   <refentrytitle id="SQL-DROPDOMAIN-TITLE">
9    DROP DOMAIN
10   </refentrytitle>
11   <refmiscinfo>SQL - Language Statements</refmiscinfo>
12  </refmeta>
13  <refnamediv>
14   <refname>
15    DROP DOMAIN
16   </refname>
17   <refpurpose>
18    remove a user-defined domain
19   </refpurpose>
20  </refnamediv>
21  <refsynopsisdiv>
22   <refsynopsisdivinfo>
23    <date>1999-07-20</date>
24   </refsynopsisdivinfo>
25   <synopsis>
26 DROP DOMAIN <replaceable class="PARAMETER">domainname</replaceable> [, ...]
27   </synopsis>
28
29   <refsect2 id="R2-SQL-DROPDOMAIN-1">
30    <refsect2info>
31     <date>2002-02-24</date>
32    </refsect2info>
33    <title>
34     Inputs
35    </title>
36    <para>
37     <variablelist>
38      <varlistentry>
39       <term><replaceable class="PARAMETER">domainname</replaceable></term>
40       <listitem>
41        <para>
42         The name of an existing domain.
43        </para>
44       </listitem>
45      </varlistentry>
46     </variablelist>
47    </para>
48   </refsect2>
49
50   <refsect2 id="R2-SQL-DROPDOMAIN-2">
51    <refsect2info>
52     <date>2002-02-24</date>
53    </refsect2info>
54    <title>
55     Outputs
56    </title>
57    <para>
58     <variablelist>
59      <varlistentry>
60       <term><computeroutput>
61 DROP
62        </computeroutput></term>
63       <listitem>
64        <para>
65         The message returned if the command is successful.
66        </para>
67       </listitem>
68      </varlistentry>
69      <varlistentry>
70       <term><computeroutput>
71 ERROR:  RemoveDomain: type '<replaceable class="parameter">domainname</replaceable>' does not exist
72        </computeroutput></term>
73       <listitem>
74        <para>
75         This message occurs if the specified domain (or type) is not found.
76        </para>
77       </listitem>
78      </varlistentry>
79     </variablelist>
80    </para>
81   </refsect2>
82  </refsynopsisdiv>
83
84  <refsect1 id="R1-SQL-DROPDOMAIN-1">
85   <refsect1info>
86    <date>2002-02-24</date>
87   </refsect1info>
88   <title>
89    Description
90   </title>
91   <para>
92    <command>DROP DOMAIN</command> will remove a user domain from the
93    system catalogs.
94   </para>
95   <para>
96    Only the owner of a domain can remove it.
97   </para>
98  </refsect1>
99
100  <refsect1 id="SQL-DROPDOMAIN-notes">
101   <title>Notes</title>
102
103   <itemizedlist>
104    <listitem>
105     <para>
106      It is the user's responsibility to remove any operators,
107      functions, aggregates, access methods, and tables that
108      use a deleted domain.
109     </para>
110    </listitem>
111   </itemizedlist>
112  </refsect1>
113
114  <refsect1 id="SQL-DROPDOMAIN-examples">
115   <title>Examples</title>
116   <para>
117    To remove the <type>box</type> domain:
118
119 <programlisting>
120 DROP DOMAIN box RESTRICT;
121 </programlisting>
122   </para>
123  </refsect1>
124
125  <refsect1 id="SQL-DROPDOMAIN-compatibility">
126   <title>Compatibility</title>
127
128   <para>
129    A <command>DROP DOMAIN</command> statement exists in SQL99.  As with
130    most other <quote>drop</quote> commands, <command>DROP
131    DOMAIN</command> in SQL99 requires a <quote>drop behavior</quote>
132    clause to select between dropping all dependent objects or refusing
133    to drop if dependent objects exist:
134 <synopsis>
135 DROP DOMAIN <replaceable>name</replaceable> { CASCADE | RESTRICT }
136 </synopsis>
137    <productname>PostgreSQL</productname> enforces the existance of
138    RESTRICT or CASCADE but ignores their enforcement against the
139    system tables.
140   </para>
141  </refsect1>
142
143  <refsect1 id="SQL-DROPDOMAIN-see-also">
144   <title>See Also</title>
145
146   <simplelist type="inline">
147    <member><xref linkend="sql-createdomain"></member>
148   </simplelist>
149  </refsect1>
150 </refentry>
151
152 <!-- Keep this comment at the end of the file
153 Local variables:
154 mode: sgml
155 sgml-omittag:nil
156 sgml-shorttag:t
157 sgml-minimize-attributes:nil
158 sgml-always-quote-attributes:t
159 sgml-indent-step:1
160 sgml-indent-data:t
161 sgml-parent-document:nil
162 sgml-default-dtd-file:"../reference.ced"
163 sgml-exposed-tags:nil
164 sgml-local-catalogs:"/usr/lib/sgml/catalog"
165 sgml-local-ecat-files:nil
166 End:
167 -->