You can now clone the schema as a non-super user. This two functions are created while creating the extension:
GRANT_CLONE_SCHEMA_PRIVILEGES - Grants the privileges to a non-super user to clone the schema.
REVOKE_CLONE_SCHEMA_PRIVILEGES - Revokes the privileges from a non-super user for cloning the schema.
GRANT_CLONE_SCHEMA_PRIVILEGES
You can grant the clone schema privileges to a non-super user using this function.
Syntax:
Where,
user_name
Name of the user to whom privileges are to be granted to do local cloning.
allow_remote_schema_clone
Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value grants user the privileges to do remote cloning.
print_commands
Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal.
This example shows how to grant a non-super user ec2-user the privileges for local and remote cloning:
REVOKE_CLONE_SCHEMA_PRIVILEGES
You can revoke the clone schema privileges from a non-super user using this function.
Syntax:
Where,
user_name
Name of the user from whom we want to revoke the cloning privileges.
revoke_remote_schema_clone
Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value revokes the remote cloning privileges from the user.
print_commands
Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal.
This example shows how to revoke cloning privileges from the ec2-user user.