55.8. pg_attrmask

The catalog pg_attrmask stores column masking expressions. The main information about columns is stored in pg_attribute. Only columns for which a masking expression has been explicitly set will have an entry here.

Table 55.8. pg_attrmask Columns

Column Type

Description

oid oid

Row identifier

amrelid oid (references pg_class.oid)

The table this expression belongs to

amnum int2 (references pg_attribute.attnum)

The number of the column

ambin pg_node_tree

The column masking expression value, in nodeToString() representation. Use pg_get_expr(ambin, amrelid) to convert it to an SQL expression.