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.

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.

Required arguments

NameTypeDescription
relationREGCLASSThe continuous aggregate to remove all policies from

Optional arguments

NameTypeDescription
if_existsBOOLWhen 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:

SELECT timescaledb_experimental.remove_all_policies('example_continuous_aggregate');

Found an issue on this page?

Report an issue!

Keywords

Related Content