Appearance
ALTER USER SET DEFAULT_CLUSTER
Set the default cluster for a specific user.
ALTER USER [ IF EXISTS ] user_name SET DEFAULT_CLUSTER cluster_name
This command is useful as an alternative to running a USE CLUSTER
command. Use double quotes for the cluster name if it contains special characters.
Important: This command does not have the same behavior as a grantable privilege and does not apply the default cluster setting to members of a role. You must set the default cluster for each user separately, regardless of role membership.
Also make sure each user has been granted USAGE ON CLUSTER
for the default cluster you are setting. (GRANT USAGE ON CLUSTER
can be set for a role or for individual users.)
Example
Set the default cluster for user ybsql10
:
yellowbrick=# alter user ybsql10 set default_cluster "bobr-rc6-cluster1";
ALTER USER
Parent topic:SQL Commands