2
.\" Title: REASSIGN OWNED
3
.\" Author: The PostgreSQL Global Development Group
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
6
.\" Manual: PostgreSQL 9.1beta1 Documentation
7
.\" Source: PostgreSQL 9.1beta1
10
.TH "REASSIGN OWNED" "7" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
22
REASSIGN_OWNED \- change the ownership of database objects owned by a database role
27
REASSIGN OWNED BY \fIold_role\fR [, \&.\&.\&.] TO \fInew_role\fR
32
instructs the system to change the ownership of the database objects owned by one of the old_roles, to new_role\&.
37
The name of a role\&. The ownership of all the objects in the current database owned by this role will be reassigned to
43
The name of the role that will be made the new owner of the affected objects\&.
48
is often used to prepare for the removal of one or more roles\&. Because
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\&.
53
requires privileges on both the source role(s) and the target role\&.
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
59
requires privileges only on the source role(s)\&.
63
command does not affect the privileges granted to the old_roles in objects that are not owned by them\&. Use
65
to revoke those privileges\&.
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\&.
80
DROP OWNED (\fBDROP_OWNED\fR(7)), DROP ROLE (\fBDROP_ROLE\fR(7)), ALTER DATABASE (\fBALTER_DATABASE\fR(7))