Skip to main content
The SHOW POLICIES statement lists the policies for a .

Syntax

Parameters

ParameterDescription
table\_nameThe name of the table to which the policy applies.

Examples

In this example, you will create a table, a role, and some policies to view:
  • The user_orders_policy is a permissive policy allowing any user to access their own orders.
  • The archived_orders_policy is a restrictive policy ensuring that customer service roles can only view non-archived orders that are assigned to them.
Create the table, enable RLS, and add a role and policies:
To view the RLS policies applied to the orders table, use the SHOW POLICIES statement:

Use pg_policies to view all row-level security policies in the system

Use the following query to view all RLS policies. This example uses the schema and policies from the .

See also