~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/drop_type.sgml

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_type.sgml,v 1.26 2004-06-25 21:55:50 tgl Exp $
 
3
PostgreSQL documentation
 
4
-->
 
5
 
 
6
<refentry id="SQL-DROPTYPE">
 
7
 <refmeta>
 
8
  <refentrytitle id="SQL-DROPTYPE-TITLE">DROP TYPE</refentrytitle>
 
9
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 
10
 </refmeta>
 
11
 
 
12
 <refnamediv>
 
13
  <refname>DROP TYPE</refname>
 
14
  <refpurpose>remove a data type</refpurpose>
 
15
 </refnamediv>
 
16
 
 
17
 <indexterm zone="sql-droptype">
 
18
  <primary>DROP TYPE</primary>
 
19
 </indexterm>
 
20
 
 
21
 <refsynopsisdiv>
 
22
<synopsis>
 
23
DROP TYPE <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
 
24
</synopsis>
 
25
 </refsynopsisdiv>
 
26
 
 
27
 <refsect1>
 
28
  <title>Description</title>
 
29
 
 
30
  <para>
 
31
   <command>DROP TYPE</command> will remove a user-defined data type.
 
32
   Only the owner of a type can remove it.
 
33
  </para>
 
34
 </refsect1>
 
35
  
 
36
 <refsect1>
 
37
  <title>Parameters</title>
 
38
 
 
39
  <variablelist>
 
40
   <varlistentry>
 
41
    <term><replaceable class="PARAMETER">name</replaceable></term>
 
42
    <listitem>
 
43
     <para>
 
44
      The name (optionally schema-qualified) of the data type to remove.
 
45
     </para>
 
46
    </listitem>
 
47
   </varlistentry>
 
48
 
 
49
   <varlistentry>
 
50
    <term><literal>CASCADE</literal></term>
 
51
    <listitem>
 
52
     <para>
 
53
      Automatically drop objects that depend on the type (such as
 
54
      table columns, functions, operators).
 
55
     </para>
 
56
    </listitem>
 
57
   </varlistentry>
 
58
 
 
59
   <varlistentry>
 
60
    <term><literal>RESTRICT</literal></term>
 
61
    <listitem>
 
62
     <para>
 
63
      Refuse to drop the type if any objects depend on it.  This is
 
64
      the default.
 
65
     </para>
 
66
    </listitem>
 
67
   </varlistentry>
 
68
  </variablelist>
 
69
 </refsect1>
 
70
  
 
71
 <refsect1 id="SQL-DROPTYPE-examples">
 
72
  <title>Examples</title>
 
73
 
 
74
  <para>
 
75
   To remove the data type <type>box</type>:
 
76
<programlisting>
 
77
DROP TYPE box;
 
78
</programlisting>
 
79
  </para>
 
80
 </refsect1>
 
81
 
 
82
 <refsect1 id="SQL-DROPTYPE-compatibility">
 
83
  <title>Compatibility</title>
 
84
 
 
85
  <para>
 
86
   This command is similar to the corresponding command in the SQL
 
87
   standard, but note that the <command>CREATE TYPE</command> command
 
88
   and the data type extension mechanisms in
 
89
   <productname>PostgreSQL</productname> differ from the SQL standard.
 
90
  </para>
 
91
 </refsect1>
 
92
 
 
93
 <refsect1 id="SQL-DROPTYPE-see-also">
 
94
  <title>See Also</title>
 
95
 
 
96
  <simplelist type="inline">
 
97
   <member><xref linkend="sql-createtype" endterm="sql-createtype-title"></member>
 
98
   <member><xref linkend="sql-altertype" endterm="sql-altertype-title"></member>
 
99
  </simplelist>
 
100
 </refsect1>
 
101
 
 
102
</refentry>
 
103
 
 
104
<!-- Keep this comment at the end of the file
 
105
Local variables:
 
106
mode: sgml
 
107
sgml-omittag:nil
 
108
sgml-shorttag:t
 
109
sgml-minimize-attributes:nil
 
110
sgml-always-quote-attributes:t
 
111
sgml-indent-step:1
 
112
sgml-indent-data:t
 
113
sgml-parent-document:nil
 
114
sgml-default-dtd-file:"../reference.ced"
 
115
sgml-exposed-tags:nil
 
116
sgml-local-catalogs:"/usr/lib/sgml/catalog"
 
117
sgml-local-ecat-files:nil
 
118
End:
 
119
-->