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

« back to all changes in this revision

Viewing changes to doc/src/sgml/man7/REASSIGN_OWNED.7

  • 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
'\" t
 
2
.\"     Title: REASSIGN OWNED
 
3
.\"    Author: The PostgreSQL Global Development Group
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
 
5
.\"      Date: 2011-04-27
 
6
.\"    Manual: PostgreSQL 9.1beta1 Documentation
 
7
.\"    Source: PostgreSQL 9.1beta1
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "REASSIGN OWNED" "7" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * set default formatting
 
13
.\" -----------------------------------------------------------------
 
14
.\" disable hyphenation
 
15
.nh
 
16
.\" disable justification (adjust text to left margin only)
 
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
 
21
.SH "NAME"
 
22
REASSIGN_OWNED \- change the ownership of database objects owned by a database role
 
23
.\" REASSIGN OWNED
 
24
.SH "SYNOPSIS"
 
25
.sp
 
26
.nf
 
27
REASSIGN OWNED BY \fIold_role\fR [, \&.\&.\&.] TO \fInew_role\fR
 
28
.fi
 
29
.SH "DESCRIPTION"
 
30
.PP
 
31
REASSIGN OWNED
 
32
instructs the system to change the ownership of the database objects owned by one of the old_roles, to new_role\&.
 
33
.SH "PARAMETERS"
 
34
.PP
 
35
\fIold_role\fR
 
36
.RS 4
 
37
The name of a role\&. The ownership of all the objects in the current database owned by this role will be reassigned to
 
38
\fInew_role\fR\&.
 
39
.RE
 
40
.PP
 
41
\fInew_role\fR
 
42
.RS 4
 
43
The name of the role that will be made the new owner of the affected objects\&.
 
44
.RE
 
45
.SH "NOTES"
 
46
.PP
 
47
REASSIGN OWNED
 
48
is often used to prepare for the removal of one or more roles\&. Because
 
49
REASSIGN OWNED
 
50
only affects the objects in the current database, it is usually necessary to execute this command in each database that contains objects owned by a role that is to be removed\&.
 
51
.PP
 
52
REASSIGN OWNED
 
53
requires privileges on both the source role(s) and the target role\&.
 
54
.PP
 
55
The
 
56
DROP OWNED (\fBDROP_OWNED\fR(7))
 
57
command is an alternative that drops all the database objects owned by one or more roles\&. Note also that
 
58
DROP OWNED
 
59
requires privileges only on the source role(s)\&.
 
60
.PP
 
61
The
 
62
REASSIGN OWNED
 
63
command does not affect the privileges granted to the old_roles in objects that are not owned by them\&. Use
 
64
DROP OWNED
 
65
to revoke those privileges\&.
 
66
.PP
 
67
The
 
68
REASSIGN OWNED
 
69
command does not affect the ownership of any databases owned by the role\&. Use
 
70
ALTER DATABASE (\fBALTER_DATABASE\fR(7))
 
71
to reassign that ownership\&.
 
72
.SH "COMPATIBILITY"
 
73
.PP
 
74
The
 
75
REASSIGN OWNED
 
76
statement is a
 
77
PostgreSQL
 
78
extension\&.
 
79
.SH "SEE ALSO"
 
80
DROP OWNED (\fBDROP_OWNED\fR(7)), DROP ROLE (\fBDROP_ROLE\fR(7)), ALTER DATABASE (\fBALTER_DATABASE\fR(7))