This example implements partial masking of data in a view. Such masking is often used for displaying credit card numbers. A privileged user creates the view, which unprivileged users (that is, without the UNMASK privilege) can then safely use because the credit card number is partially masked.
CREATE TABLE masking_table (int_masked INTEGER8 MASKED NOT NULL);INSERT INTO masking_table VALUES