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.”

SVV_RLS_RELATION - Amazon Redshift

SVV_RLS_RELATION

Use SVV_RLS_RELATION to view a list of all relations that are RLS-protected.

SVV_RLS_RELATION is visible to all users. Superusers can see all rows; regular users can see only their own data. For more information, see Visibility of data in system tables and views.

Table columns

Column name Data type Description
datname text The name of the database containing the relation.
relschema text The name of the schema containing the relation.
relname text The name of the relation.
relkind text The type of the relation, such as tables or views.
is_rls_on boolean The parameter that indicates whether the relation is RLS-protected.
is_rls_datashare_on boolean The parameter that indicates whether the relation is RLS-protected over datashares.
rls_conjunction_type character(3) The parameter that indicates whether relation combine RLS policies with and or or.
rls_datashare_conjunction_type character(3) The parameter that indicates whether relation combine RLS policies with and or or over datashares.

Sample query

The following example displays the result of the SVV_RLS_RELATION.

ALTER TABLE tickit_category_redshift ROW LEVEL SECURITY ON FOR DATASHARES; --Inspect RLS state on the relations using SVV_RLS_RELATION. SELECT datname, relschema, relname, relkind, is_rls_on, is_rls_datashare_on FROM svv_rls_relation ORDER BY relname; datname | relschema | relname | relkind | is_rls_on | is_rls_datashare_on | rls_conjunction_type | rls_datashare_conjunction_type -----------+-----------+--------------------------+---------+-----------+---------------------+----------------------+-------------------------------- tickit_db | public | tickit_category_redshift | table | t | t | and | and (1 row)
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.