ALTER RLS POLICY - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Alter an existing row-level security policy on a table.

Superusers and users or roles that have the sys:secadmin role can alter a policy.


ALTER RLS POLICY policy_name USING ( using_predicate_exp );



The name of the policy.

USING ( using_predicate_exp )

Specifies a filter that is applied to the WHERE clause of the query. Amazon Redshift applies a policy predicate before the query-level user predicates. For example, current_user = ‘joe’ and price > 10 limits Joe to see only records with the price greater than $10.

The expression has access to the variables declared in the WITH clause of the CREATE RLS POLICY statement that was used to create the policy with name policy_name.


The following example alters a RLS policy.

-- First create an RLS policy that limits access to rows where catgroup is 'concerts'. CREATE RLS POLICY policy_concerts WITH (catgroup VARCHAR(10)) USING (catgroup = 'concerts'); -- Then, alter the RLS policy to only show rows where catgroup is 'piano concerts'. ALTER RLS POLICY policy_concerts USING (catgroup = 'piano concerts');