Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 1.54 KB

File metadata and controls

59 lines (44 loc) · 1.54 KB
title remove_continuous_aggregate_policy()
description Remove a refresh policy from a continuous aggregate
topics
continuous aggregates
jobs
keywords
continuous aggregates
policies
remove
tags
delete
drop
license community
type function
products
cloud
self_hosted
mst

import ReturnsVoid from '/snippets/reference/timescaledb/_returns-void.mdx'; import { CAGG, TIMESCALE_DB } from '/snippets/vars.mdx';

Since 1.7.0

Remove all refresh policies from a {CAGG}.

remove_continuous_aggregate_policy(
    continuous_aggregate REGCLASS,
    if_exists BOOL = NULL
) RETURNS VOID
To view the existing {CAGG} policies, see the [policies informational view][policies].

Samples

Remove all refresh policies from the cpu_view {CAGG}:

SELECT remove_continuous_aggregate_policy('cpu_view');

Arguments

The syntax is:

SELECT remove_continuous_aggregate_policy(
    continuous_aggregate = '<view_name>',
    if_exists = true | false
);
Name Type Default Required Description
continuous_aggregate REGCLASS - Name of the {CAGG} the policies should be removed from
if_exists (formerly if_not_exists) BOOL false - When true, prints a warning instead of erroring if the policy doesn't exist. Renamed in {TIMESCALE_DB} 2.8.

Returns