Skip to content

remove_retention_policy()

Remove a retention policy from a hypertable

Community Since 1.2.0

Remove a policy to drop chunks of a particular hypertable.

SELECT remove_retention_policy('conditions');

Removes the existing data retention policy for the conditions table.

The syntax is:

SELECT remove_retention_policy(
relation = '<hypertable_or_cagg_name>',
if_exists = true | false
);
NameTypeDefaultRequiredDescription
relationREGCLASS-Name of the hypertable or continuous aggregate from which to remove the policy
if_existsBOOLEANfalse-Set to true to avoid throwing an error if the policy does not exist.

This function returns void.