~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-updates

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
$PostgreSQL$
 
3
PostgreSQL documentation
 
4
-->
 
5
 
 
6
<refentry id="SQL-REASSIGN-OWNED">
 
7
 <refmeta>
 
8
  <refentrytitle id="SQL-REASSIGN-OWNED-TITLE">REASSIGN OWNED</refentrytitle>
 
9
  <manvolnum>7</manvolnum>
 
10
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 
11
 </refmeta>
 
12
 
 
13
 <refnamediv>
 
14
  <refname>REASSIGN OWNED</refname>
 
15
  <refpurpose>change the ownership of database objects owned by a database role</refpurpose>
 
16
 </refnamediv>
 
17
 
 
18
 <indexterm zone="sql-reassign-owned">
 
19
  <primary>REASSIGN OWNED</primary>
 
20
 </indexterm>
 
21
 
 
22
 <refsynopsisdiv>
 
23
<synopsis>
 
24
REASSIGN OWNED BY <replaceable class="PARAMETER">old_role</replaceable> [, ...] TO <replaceable class="PARAMETER">new_role</replaceable>
 
25
</synopsis>
 
26
 </refsynopsisdiv>
 
27
 
 
28
 <refsect1>
 
29
  <title>Description</title>
 
30
 
 
31
  <para>
 
32
   <command>REASSIGN OWNED</command> instructs the system to change
 
33
   the ownership of the database objects owned by one of the
 
34
   old_roles, to new_role.
 
35
  </para>
 
36
 </refsect1>
 
37
 
 
38
 <refsect1>
 
39
  <title>Parameters</title>
 
40
 
 
41
  <variablelist>
 
42
   <varlistentry>
 
43
    <term><replaceable class="PARAMETER">old_role</replaceable></term>
 
44
    <listitem>
 
45
     <para>
 
46
      The name of a role. The ownership of all the objects in the
 
47
      current database owned by this role will be reassigned to
 
48
      <replaceable class="PARAMETER">new_role</replaceable>.
 
49
     </para>
 
50
    </listitem>
 
51
   </varlistentry>
 
52
 
 
53
   <varlistentry>
 
54
    <term><replaceable class="PARAMETER">new_role</replaceable></term>
 
55
    <listitem>
 
56
     <para>
 
57
      The name of the role that will be made the new owner of the
 
58
      affected objects.
 
59
     </para>
 
60
    </listitem>
 
61
   </varlistentry>
 
62
  </variablelist>
 
63
 </refsect1>
 
64
 
 
65
 <refsect1>
 
66
  <title>Notes</title>
 
67
 
 
68
  <para>
 
69
   <command>REASSIGN OWNED</command> is often used to prepare for the
 
70
   removal of one or more roles. Because <command>REASSIGN
 
71
   OWNED</command> only affects the objects in the current database,
 
72
   it is usually necessary to execute this command in each database
 
73
   that contains objects owned by a role that is to be removed.
 
74
  </para>
 
75
 
 
76
  <para>
 
77
   The <xref linkend="sql-drop-owned"
 
78
    endterm="sql-drop-owned-title"> command is an alternative that
 
79
   drops all the database objects owned by one or more roles.
 
80
  </para>
 
81
 
 
82
  <para>
 
83
   The <command>REASSIGN OWNED</command> command does not affect the
 
84
   privileges granted to the old_roles in objects that are not owned
 
85
   by them.  Use <command>DROP OWNED</command> to revoke those
 
86
   privileges.
 
87
  </para>
 
88
 
 
89
 </refsect1>
 
90
 
 
91
 <refsect1>
 
92
  <title>Compatibility</title>
 
93
 
 
94
  <para>
 
95
   The <command>REASSIGN OWNED</command> statement is a
 
96
   <productname>PostgreSQL</productname> extension.
 
97
  </para>
 
98
 </refsect1>
 
99
 
 
100
 <refsect1>
 
101
  <title>See Also</title>
 
102
 
 
103
  <simplelist type="inline">
 
104
   <member><xref linkend="sql-drop-owned" endterm="sql-drop-owned-title"></member>
 
105
   <member><xref linkend="sql-droprole" endterm="sql-droprole-title"></member>
 
106
  </simplelist>
 
107
 </refsect1>
 
108
 
 
109
</refentry>