Skip to main content
Early access Remove all policies from a . The removed and retention policies apply to the , not to the original .
timescaledb_experimental.remove_all_policies(
     relation REGCLASS,
     if_exists BOOL = false
) RETURNS BOOL

Samples

Remove all policies from a named example_continuous_aggregate. This includes refresh policies, policies, and data retention policies. It doesn’t include custom jobs:
SELECT timescaledb_experimental.remove_all_policies('example_continuous_aggregate');

Arguments

The syntax is:
CALL remove_all_policies(
    relation = '<view_name>',
    if_exists = true | false
);
NameTypeDefaultRequiredDescription
relationREGCLASS-The to remove all policies from
if_existsBOOLfalse-When true, prints a warning instead of erroring if any policies are missing.

Returns

Returns true if successful.