REASSIGN OWNED

REASSIGN OWNED reassigns the owner of all the objects that are owned by one of the specified roles.

NOTE: Unlike PostgreSQL, Materialize reassigns all objects across all databases, including the databases themselves.

Syntax

REASSIGN OWNED BY old_role , TO new_role
Field Use
old_role The role name whose owned objects will be reassigned.
new_role The role name of the new owner of all the objects.

Examples

REASSIGN OWNED BY joe TO mike;
REASSIGN OWNED BY joe, george TO mike;

Privileges

The privileges required to execute this statement are:

  • Role membership in old_role and new_role.
Back to top ↑