Change the Owner of a Schema

SarahLSarahL Administrator, Moderator, Employee, Registered User, VerticaExpert, CABuser, VerticaPartners

Jim Knicely authored this tip.

As of Vertica 9.1.1, you can now transfer the ownership of a schema to another user!

Example:

dbadmin=> SELECT schema_name, schema_owner FROM schemata WHERE schema_name = 'my_etl_schema';
  schema_name  | schema_owner
---------------+--------------
 my_etl_schema | dbadmin
(1 row)

dbadmin=> CREATE USER etl_user;
CREATE USER

dbadmin=> ALTER SCHEMA my_etl_schema OWNER TO etl_user;
ALTER SCHEMA

dbadmin=> SELECT schema_name, schema_owner FROM schemata WHERE schema_name = 'my_etl_schema';
  schema_name  | schema_owner
---------------+--------------
 my_etl_schema | etl_user
(1 row)

Have fun!

Sign In or Register to comment.