DETACH 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).


Detach a row-level security policy on a table from one or more users or roles.

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


DETACH RLS POLICY policy_name ON [TABLE] table_name [, ...] FROM { user_name | ROLE role_name | PUBLIC } [, ...]



The name of the policy.

ON [TABLE] table_name [, ...]

The table or view that the row-level security policy is detached from.

FROM { user_name | ROLE role_name | PUBLIC} [, ...]

Specifies whether the policy is detached from one or more specified users or roles.

Usage notes

When working with the DETACH RLS POLICY statement, observe the following:

  • You can detach a policy from a relation, user, role, or public.


The following example detaches a policy on a table from a role.

DETACH RLS POLICY policy_concerts ON tickit_category_redshift FROM ROLE analyst, ROLE dbadmin;