Data redaction system catalogs v16

System catalogs store the redaction policy information.

edb_redaction_column

The edb_redaction_column system catalog stores information about the data redaction policy attached to the columns of a table.

ColumnTypeReferencesDescription
oidoidRow identifier (hidden attribute, must be explicitly selected)
rdpolicyidoidedb_redaction_policy.oidThe data redaction policy that applies to the described column
rdrelidoidpg_class.oidThe table that the described column belongs to
rdattnumint2pg_attribute.attnumThe number of the described column
rdscopeint2The redaction scope: 1 = query, 2 = top_tlist, 4 = top_tlist_or_error
rdexceptionint2The redaction exception: 8 = none, 16 = equal, 32 = leakproof
rdfuncexprpg_node_treeData redaction function expression
Note

The described column is redacted if the redaction policy edb_redaction_column.rdpolicyid on the table is enabled and the redaction policy expression edb_redaction_policy.rdexpr evaluates to true.

edb_redaction_policy

The catalog edb_redaction_policy stores information about the redaction policies for tables.

ColumnTypeReferencesDescription
oidoidRow identifier (hidden attribute, must be explicitly selected)
rdnamenameThe name of the data redaction policy
rdrelidoidpg_class.oidThe table to which the data redaction policy applies
rdenablebooleanIs the data redaction policy enabled?
rdexprpg_node_treeThe data redaction policy expression
Note

The data redaction policy applies for the table if it's enabled and the expression ever evaluated true.