| title |
remove_continuous_aggregate_policy() |
| description |
Remove a refresh policy from a continuous aggregate |
| topics |
continuous aggregates |
jobs |
|
| keywords |
continuous aggregates |
policies |
remove |
|
| tags |
|
| license |
community |
| type |
function |
| products |
|
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].
Remove all refresh policies from the cpu_view {CAGG}:
SELECT remove_continuous_aggregate_policy('cpu_view');
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. |