~ubuntu-branches/ubuntu/utopic/pgadmin3/utopic

« back to all changes in this revision

Viewing changes to docs/en_US/pg/sql-altertype.html

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Enrici, src/frm/frmBackup.cpp, debian/control
  • Date: 2006-10-06 21:06:48 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 edgy)
  • Revision ID: james.westby@ubuntu.com-20061006210648-nscnazrse5jbwswf
* Patched frmBackup.cpp to ensure the schema is specified when backing up
  individual tables. (Closes: #387256)
  [src/frm/frmBackup.cpp]
* Cleaned up and updated description of the package. (Closes: #379188)
  [debian/control]

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
<title>ALTER TYPE</title>
5
5
<link rel="stylesheet" href="stylesheet.css" type="text/css">
6
6
<link rev="made" href="pgsql-docs@postgresql.org">
7
 
<meta name="generator" content="DocBook XSL Stylesheets V1.64.1">
8
 
<link rel="home" href="index.html" title="PostgreSQL 8.0.0beta5 Documentation">
 
7
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
 
8
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
9
9
<link rel="up" href="sql-commands.html" title="SQL Commands">
10
 
<link rel="previous" href="sql-altertrigger.html" title="ALTER TRIGGER">
 
10
<link rel="prev" href="sql-altertrigger.html" title="ALTER TRIGGER">
11
11
<link rel="next" href="sql-alteruser.html" title="ALTER USER">
 
12
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
12
13
</head>
13
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
14
 
<a name="sql-altertype"></a><div class="titlepage">
15
 
<div></div>
16
 
<div></div>
17
 
</div>
 
15
<a name="sql-altertype"></a><div class="titlepage"></div>
18
16
<div class="refnamediv">
19
17
<h2>Name</h2>
20
18
<p>   ALTER TYPE
21
19
   &#8212;    change the definition of a type
22
20
  </p>
23
21
</div>
24
 
<a name="id2664950"></a><div class="refsynopsisdiv">
 
22
<a name="id747339"></a><div class="refsynopsisdiv">
25
23
<h2>Synopsis</h2>
26
 
<pre class="synopsis">ALTER TYPE <i class="replaceable"><tt>name</tt></i> OWNER TO <i class="replaceable"><tt>new_owner</tt></i> 
 
24
<pre class="synopsis">ALTER TYPE <em class="replaceable"><code>name</code></em> OWNER TO <em class="replaceable"><code>new_owner</code></em> 
 
25
ALTER TYPE <em class="replaceable"><code>name</code></em> SET SCHEMA <em class="replaceable"><code>new_schema</code></em>
27
26
  </pre>
28
27
</div>
29
28
<div class="refsect1" lang="en">
30
 
<a name="id2664978"></a><h2>Description</h2>
31
 
<p>   <tt class="command">ALTER TYPE</tt> changes the definition of an existing type.
32
 
   The only currently available capability is changing the owner of a type.
 
29
<a name="id747384"></a><h2>Description</h2>
 
30
<p>   <code class="command">ALTER TYPE</code> changes the definition of an existing type.
 
31
   The only currently available capabilities are changing the owner and schema
 
32
   of a type.
 
33
  </p>
 
34
<p>   You must own the type to use <code class="command">ALTER TYPE</code>.
 
35
   To change the schema of a type, you must also have
 
36
   <code class="literal">CREATE</code> privilege on the new schema.
 
37
   To alter the owner, you must also be a direct or indirect member of the new
 
38
   owning role, and that role must have <code class="literal">CREATE</code> privilege on
 
39
   the type's schema.  (These restrictions enforce that altering the owner
 
40
   doesn't do anything you couldn't do by dropping and recreating the type.
 
41
   However, a superuser can alter ownership of any type anyway.)
33
42
  </p>
34
43
</div>
35
44
<div class="refsect1" lang="en">
36
 
<a name="id2664991"></a><h2>Parameters</h2>
 
45
<a name="id747430"></a><h2>Parameters</h2>
37
46
<p>    </p>
38
47
<div class="variablelist"><dl>
39
 
<dt><span class="term"><i class="replaceable"><tt>name</tt></i></span></dt>
 
48
<dt><span class="term"><em class="replaceable"><code>name</code></em></span></dt>
40
49
<dd><p>        The name (possibly schema-qualified) of an existing type to
41
50
        alter.
42
51
       </p></dd>
43
 
<dt><span class="term"><i class="replaceable"><tt>new_owner</tt></i></span></dt>
 
52
<dt><span class="term"><em class="replaceable"><code>new_owner</code></em></span></dt>
44
53
<dd><p>        The user name of the new owner of the type.
45
 
        You must be a superuser to change a type's owner.
 
54
       </p></dd>
 
55
<dt><span class="term"><em class="replaceable"><code>new_schema</code></em></span></dt>
 
56
<dd><p>        The new schema for the type.
46
57
       </p></dd>
47
58
</dl></div>
48
59
<p>
49
60
   </p>
50
61
</div>
51
62
<div class="refsect1" lang="en">
52
 
<a name="id2665023"></a><h2>Examples</h2>
 
63
<a name="id747476"></a><h2>Examples</h2>
53
64
<p> 
54
 
   To change the owner of the user-defined type <tt class="literal">email</tt>
55
 
   to <tt class="literal">joe</tt>:
 
65
   To change the owner of the user-defined type <code class="literal">email</code>
 
66
   to <code class="literal">joe</code>:
56
67
   </p>
57
68
<pre class="programlisting">ALTER TYPE email OWNER TO joe;
58
69
   </pre>
59
70
<p>
60
71
  </p>
 
72
<p>   To change the schema of the user-defined type <code class="literal">email</code>
 
73
   to <code class="literal">customers</code>:
 
74
   </p>
 
75
<pre class="programlisting">ALTER TYPE email SET SCHEMA customers;
 
76
   </pre>
 
77
<p>
 
78
  </p>
61
79
</div>
62
80
<div class="refsect1" lang="en">
63
 
<a name="id2665047"></a><h2>Compatibility</h2>
64
 
<p>   There is no <tt class="command">ALTER TYPE</tt> statement in the SQL
 
81
<a name="id747527"></a><h2>Compatibility</h2>
 
82
<p>   There is no <code class="command">ALTER TYPE</code> statement in the SQL
65
83
   standard.
66
84
  </p>
67
85
</div>