1REASSIGN OWNED(7)       PostgreSQL 9.2.24 Documentation      REASSIGN OWNED(7)
2
3
4

NAME

6       REASSIGN_OWNED - change the ownership of database objects owned by a
7       database role
8

SYNOPSIS

10       REASSIGN OWNED BY old_role [, ...] TO new_role
11

DESCRIPTION

13       REASSIGN OWNED instructs the system to change the ownership of database
14       objects owned by any of the old_roles to new_role.
15

PARAMETERS

17       old_role
18           The name of a role. The ownership of all the objects in the current
19           database owned by this role will be reassigned to new_role.
20
21       new_role
22           The name of the role that will be made the new owner of the
23           affected objects.
24

NOTES

26       REASSIGN OWNED is often used to prepare for the removal of one or more
27       roles. Because REASSIGN OWNED only affects the objects in the current
28       database, it is usually necessary to execute this command in each
29       database that contains objects owned by a role that is to be removed.
30
31       REASSIGN OWNED requires privileges on both the source role(s) and the
32       target role.
33
34       The DROP OWNED (DROP_OWNED(7)) command is an alternative that simply
35       drops all the database objects owned by one or more roles.
36
37       The REASSIGN OWNED command does not affect any privileges granted to
38       the old_roles for objects that are not owned by them. Use DROP OWNED to
39       revoke such privileges.
40
41       See Section 20.4, “Dropping Roles”, in the documentation for more
42       discussion.
43
44       The REASSIGN OWNED command does not affect the ownership of any
45       databases owned by the role. Use ALTER DATABASE (ALTER_DATABASE(7)) to
46       reassign that ownership.
47

COMPATIBILITY

49       The REASSIGN OWNED command is a PostgreSQL extension.
50

SEE ALSO

52       DROP OWNED (DROP_OWNED(7)), DROP ROLE (DROP_ROLE(7)), ALTER DATABASE
53       (ALTER_DATABASE(7))
54
55
56
57PostgreSQL 9.2.24                 2017-11-06                 REASSIGN OWNED(7)
Impressum