~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- doc/src/sgml/ref/drop_cast.sgml -->
 
2
 
 
3
<refentry id="SQL-DROPCAST">
 
4
 <refmeta>
 
5
  <refentrytitle>DROP CAST</refentrytitle>
 
6
  <manvolnum>7</manvolnum>
 
7
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 
8
 </refmeta>
 
9
 
 
10
 <refnamediv>
 
11
  <refname>DROP CAST</refname>
 
12
  <refpurpose>remove a cast</refpurpose>
 
13
 </refnamediv>
 
14
 
 
15
 <indexterm zone="sql-dropcast">
 
16
  <primary>DROP CAST</primary>
 
17
 </indexterm>
 
18
 
 
19
 <refsynopsisdiv>
 
20
<synopsis>
 
21
DROP CAST [ IF EXISTS ] (<replaceable>source_type</replaceable> AS <replaceable>target_type</replaceable>) [ CASCADE | RESTRICT ]
 
22
</synopsis>
 
23
 </refsynopsisdiv>
 
24
 
 
25
 <refsect1 id="sql-dropcast-description">
 
26
  <title>Description</title>
 
27
 
 
28
  <para>
 
29
   <command>DROP CAST</command> removes a previously defined cast.
 
30
  </para>
 
31
 
 
32
  <para>
 
33
   To be able to drop a cast, you must own the source or the target
 
34
   data type.  These are the same privileges that are required to
 
35
   create a cast.
 
36
  </para>
 
37
 </refsect1>
 
38
 
 
39
 <refsect1>
 
40
  <title>Parameters</title>
 
41
 
 
42
   <variablelist>
 
43
 
 
44
   <varlistentry>
 
45
    <term><literal>IF EXISTS</literal></term>
 
46
    <listitem>
 
47
     <para>
 
48
      Do not throw an error if the cast does not exist. A notice is issued
 
49
      in this case.
 
50
     </para>
 
51
    </listitem>
 
52
   </varlistentry>
 
53
 
 
54
    <varlistentry>
 
55
     <term><replaceable>source_type</replaceable></term>
 
56
 
 
57
     <listitem>
 
58
      <para>
 
59
       The name of the source data type of the cast.
 
60
      </para>
 
61
     </listitem>
 
62
    </varlistentry>
 
63
 
 
64
    <varlistentry>
 
65
     <term><replaceable>target_type</replaceable></term>
 
66
 
 
67
     <listitem>
 
68
      <para>
 
69
       The name of the target data type of the cast.
 
70
      </para>
 
71
     </listitem>
 
72
    </varlistentry>
 
73
 
 
74
    <varlistentry>
 
75
     <term><literal>CASCADE</literal></term>
 
76
     <term><literal>RESTRICT</literal></term>
 
77
 
 
78
     <listitem>
 
79
      <para>
 
80
       These key words do not have any effect, since there are no
 
81
       dependencies on casts.
 
82
      </para>
 
83
     </listitem>
 
84
    </varlistentry>
 
85
   </variablelist>
 
86
 </refsect1>
 
87
 
 
88
 <refsect1 id="sql-dropcast-examples">
 
89
  <title>Examples</title>
 
90
 
 
91
  <para>
 
92
   To drop the cast from type <type>text</type> to type <type>int</type>:
 
93
<programlisting>
 
94
DROP CAST (text AS int);
 
95
</programlisting>
 
96
  </para>
 
97
 </refsect1>
 
98
 
 
99
 <refsect1 id="sql-dropcast-compat">
 
100
  <title>Compatibility</title>
 
101
 
 
102
  <para>
 
103
   The <command>DROP CAST</command> command conforms to the SQL standard.
 
104
  </para>
 
105
 </refsect1>
 
106
 
 
107
 <refsect1>
 
108
  <title>See Also</title>
 
109
 
 
110
  <simplelist type="inline">
 
111
   <member><xref linkend="sql-createcast"></member>
 
112
  </simplelist>
 
113
 </refsect1>
 
114
 
 
115
</refentry>