remove_all_policies()
Remove all policies from a continuous aggregate
Early access 2.10.0
Remove all policies from a continuous aggregate. The removed columnstore and retention policies apply to the continuous aggregate, not to the original hypertable.
timescaledb_experimental.remove_all_policies( relation REGCLASS, if_exists BOOL = false) RETURNS BOOLSamples
Section titled “Samples”Remove all policies from a continuous aggregate named
example_continuous_aggregate. This includes refresh policies, columnstore
policies, and data retention policies. It doesn’t include custom jobs:
SELECT timescaledb_experimental.remove_all_policies('example_continuous_aggregate');Arguments
Section titled “Arguments”The syntax is:
SELECT timescaledb_experimental.remove_all_policies( relation = '<view_name>', if_exists = true | false);| Name | Type | Default | Required | Description |
|---|---|---|---|---|
relation | REGCLASS | - | ✔ | The continuous aggregate to remove all policies from |
if_exists | BOOL | false | - | When true, prints a warning instead of erroring if any policies are missing. |
Returns
Section titled “Returns”Returns true if successful.