Creates a secure access policy that filters access to table data to users and roles. You can create access policies for table rows and columns. Vertica applies the access policy filters with each query, and returns only the data that is permissible for the current user or role.


CREATE ACCESS POLICY ON [[database.]schema.]table { FOR COLUMN column | FOR ROWS WHERE } expression { ENABLE | DISABLE }



Specifies a schema, by default public. If schema is any schema other than public, you must supply the schema name. For example:


If you specify a database, it must be the current database.


The table with the target column or rows.


The column on which to apply this access policy.

FOR ROWS WHERE The rows on which to apply this access policy.

An SQL expression that specifies conditions for accessing row or column data:

  • Row access policies limits access to specific rows in a table, as specified by the policy's WHERE expression. Only rows that satisfy this expression are fetched from the table. For details and sample usage, see Creating Row Access Policies.
  • Column access policies limit access to specific table columns. The access policy expression can also specify how to render column data to specific users and roles. For details and sample usage, see Creating Column Access Policies.
ENABLE | DISABLE Specifies whether to enable the access policy. If you specify DISABLE, Vertica does not use this policy. To enable a diasbled policy, call ALTER ACCESS POLICY.