remove_all_policies()
Remove all policies from a continuous aggregate. The removed compression and retention policies apply to the continuous aggregate, not to the original hypertable.
2. timescaledb_experimental.remove_all_policies(
4. relation REGCLASS,
6. if_exists BOOL = false
8. ) RETURNS BOOL
warning
Experimental features could have bugs. They might not be backwards compatible, and could be removed in future releases. Use these features at your own risk, and do not use any experimental features in production.
Required arguments
| Name | Type | Description |
|---|---|---|
relation |
REGCLASS |
The continuous aggregate to remove all policies from |
Optional arguments
| Name | Type | Description |
|---|---|---|
if_exists |
BOOL |
When true, prints a warning instead of erroring if any policies are missing. Defaults to false. |
Returns
Returns true if successful.
Sample usage
Remove all policies from a continuous aggregate named example_continuous_aggregate. This includes refresh policies, compression policies, and data retention policies. It doesn’t include user-defined jobs:
2. SELECT timescaledb_experimental.remove_all_policies('example_continuous_aggregate');
