Top
Enterprise Postgres 16 Operation Guide

8.2.3 Confirming a Masking Policy

An example of the operation on the server is shown below.

  1. Confirm information about a masking target where a masking policy is set
    Refer to the pgx_confidential_columns table to confirm the masking target where the masking policy is set.

    postgres=# select * from pgx_confidential_columns;
     schema_name | table_name | policy_name | column_name | function_type |          function_parameters           | regexp_pattern | regexp_replacement | regexp_flags | column_description 
    -------------+------------+-------------+-------------+---------------+----------------------------------------+----------------+--------------------+-------------+--------------------
     public      | t1         | p1          | c1          | FULL          |                                        |                |                    |             | 
     public      | t1         | p1          | c2          | PARTIAL       | VVVFVVVVFVVVV, VVV-VVVV-VVVV, *, 4, 11 |                |                    |             | 
    (2 row)
  2. Confirm information about the masking policy content
    Refer to pgx_confidential_policies to confirm the masking policy content.

    postgres=# select * from pgx_confidential_policies;
     schema_name | table_name | policy_name | expression | enable | policy_description 
    -------------+------------+-------------+------------+--------+--------------------
     public      | t1         | p1          | 1=1        | t      | 
    (1 row)

See