1REASSIGN OWNED(7) SQL Commands REASSIGN OWNED(7)
2
3
4
6 REASSIGN OWNED - change the ownership of database objects owned by a
7 database role
8
9
11 REASSIGN OWNED BY old_role [, ...] TO new_role
12
13
15 REASSIGN OWNED instructs the system to change the ownership of the
16 database objects owned by one of the old_roles, to new_role.
17
19 old_role
20 The name of a role. The ownership of all the objects in the cur‐
21 rent database owned by this role will be reassigned to new_role.
22
23 new_role
24 The name of the role that will be made the new owner of the
25 affected objects.
26
28 REASSIGN OWNED is often used to prepare for the removal of one or more
29 roles. Because REASSIGN OWNED only affects the objects in the current
30 database, it is usually necessary to execute this command in each data‐
31 base that contains objects owned by a role that is to be removed.
32
33 The DROP OWNED [drop_owned(7)] command is an alternative that drops all
34 the database objects owned by one or more roles.
35
36 The REASSIGN OWNED command does not affect the privileges granted to
37 the old_roles in objects that are not owned by them. Use DROP OWNED to
38 revoke those privileges.
39
41 The REASSIGN OWNED statement is a PostgreSQL extension.
42
44 DROP OWNED [drop_owned(7)], DROP ROLE [drop_role(7)]
45
46
47
48SQL - Language Statements 2011-09-22 REASSIGN OWNED(7)