REASSIGN OWNED
Changes the ownership of database objects owned by a database role.
Synopsis
REASSIGN OWNED BY { <old_role> | CURRENT_USER | SESSION_USER } [, ...]
TO { <new_role> | CURRENT_USER | SESSION_USER }
Description
REASSIGN OWNED
changes the ownership of database objects owned by any of the old_roles to new_role.
Parameters
old_role
The name of a role. The ownership of all the objects in the current database, and of all shared objects (databases, tablespaces), owned by this role will be reassigned to new_role.
new_role
The name of the role that will be made the new owner of the affected objects.