TimescaleDB API referenceContinuous aggregates

Remove all policies from a continuous aggregate. The removed compression 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 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.

NameTypeDescription
relationREGCLASSThe continuous aggregate to remove all policies from
NameTypeDescription
if_existsBOOLWhen true, prints a warning instead of erroring if any policies are missing. Defaults to false.

Returns true if successful.

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:

SELECT timescaledb_experimental.remove_all_policies('example_continuous_aggregate');

Keywords

Found an issue on this page?Report an issue or Edit this page in GitHub.