Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

DETACH RLS POLICY - Amazon Redshift

DETACH RLS POLICY

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.

Syntax

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

Parameters

policy_name

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.

Examples

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;
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.