ALTER ... OWNER
ALTER ... OWNER
updates the owner of an item.
ALPHA!
This feature
is in alpha. It has known performance or stability issues and is under
active development. It is not subject to our backwards compatibility
guarantees.
You must contact us to enable this feature in your Materialize region.
You must contact us to enable this feature in your Materialize region.
Syntax
Field | Use |
---|---|
name | The identifier of the item you want to alter. |
new_owner | The role name you want to set as the new owner. |
Details
You must be a member of the new owner role to alter the ownership of an object. You cannot alter the owner of an index. If you try, it will return successfully with a warning, but will not actually change the owner of the index. This is for backwards compatibility reasons. The index owner is always kept in-sync with the owner of the underlying relation.
Examples
ALTER TABLE t OWNER TO joe;
ALTER CLUSTER REPLICA production.r1 OWNER TO admin;