remove_policies()

To remove all policies on a continuous aggregate, see remove_all_policies().

warning
NameTypeDescription
if_existsBOOLWhen true, prints a warning instead of erroring if the policy doesn’t exist. Defaults to false.
policy_namesTEXTThe policies to remove. You can list multiple policies, separated by a comma. Allowed policy names are policy_refresh_continuous_aggregate, , and policy_retention.

Returns true if successful.

Throw an error if either policy doesn’t exist. If the continuous aggregate has a compression policy, leave it unchanged:

  1. SELECT timescaledb_experimental.remove_policies(
  2. 'example_continuous_aggregate',
  3. false,
  4. 'policy_refresh_continuous_aggregate',
  5. 'policy_retention'