show_policies()
Show all policies that are currently set on a continuous aggregate.
2. timescaledb_experimental.show_policies(
4. relation REGCLASS
6. ) RETURNS SETOF JSONB
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
| Name | Type | Description |
|---|---|---|
relation |
REGCLASS |
The continuous aggregate to display policies for |
Returns
| Column | Type | Description |
|---|---|---|
show_policies |
JSONB |
Details for each policy set on the continuous aggregate |
Sample usage
Given a continuous aggregate named example_continuous_aggregate, show all the policies set on it:
2. SELECT timescaledb_experimental.show_policies('example_continuous_aggregate');
Example of returned data:
2. show_policies
5. --------------------------------------------------------------------------------
7. {"policy_name": "policy_compression", "compress_after": 11, "compress_interval": "@ 1 day"}
9. {"policy_name": "policy_refresh_continuous_aggregate", "refresh_interval": "@ 1 hour", "refresh_end_offset": 1, "refresh_start_offset": 10}
11. {"drop_after": 20, "policy_name": "policy_retention", "retention_interval": "@ 1 day"}
