'TimescaleDB - get retention policy and chunk_time_interval for a table

Given a hypertable

SELECT create_hypertable('conditions', 'time', chunk_time_interval => INTERVAL '1 day');

SELECT add_retention_policy('conditions', INTERVAL '6 months');

in TimescaleDB, how can I retrieve the length of both intervals (chunk_time_interval and retention policy interval) using a select statement, providing the table name?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source