DROP QUERY POLICY

View as Markdown
PREVIEW This feature is in private preview. It is under active development and may have stability or performance issues. It isn't subject to our backwards compatibility guarantees.
To enable this feature for your environment, contact our team.

DROP QUERY POLICY removes a query policy from Materialize.

Syntax

DROP QUERY POLICY [IF EXISTS] <name> [, ...] [CASCADE | RESTRICT];
Syntax element Description
IF EXISTS Optional. If specified, do not return an error if the specified query policy does not exist.
<name> The query policy to drop. For available query policies, see SHOW QUERY POLICIES.
CASCADE Optional. If specified, detach the query policy from all clusters, then drop it. The clusters are not dropped.
RESTRICT Optional. Do not drop the query policy if it is attached to a cluster. (Default.)

Privileges

The privileges required to execute this statement are:

  • Ownership of the query policy.

Examples

DROP QUERY POLICY indexed_reads_only CASCADE;
Back to top ↑