显示当前在连续聚合上设置的所有策略。

timescaledb_experimental.show_policies(
relation REGCLASS
) RETURNS SETOF JSONB
警告

实验性功能可能存在错误。它们可能不向后兼容,并可能在未来的版本中删除。使用这些功能需自行承担风险,并且不要在生产环境中使用任何实验性功能。

名称类型描述
relationREGCLASS要显示策略的连续聚合
类型描述
show_policiesJSONB在连续聚合上设置的每个策略的详细信息

给定一个名为 example_continuous_aggregate 的连续聚合,显示在其上设置的所有策略

SELECT timescaledb_experimental.show_policies('example_continuous_aggregate');

返回数据示例

show_policies
--------------------------------------------------------------------------------
{"policy_name": "policy_compression", "compress_after": 11, "compress_interval": "@ 1 day"}
{"policy_name": "policy_refresh_continuous_aggregate", "refresh_interval": "@ 1 hour", "refresh_end_offset": 1, "refresh_start_offset": 10}
{"drop_after": 20, "policy_name": "policy_retention", "retention_interval": "@ 1 day"}

关键词

在此页面上发现问题?报告问题 或 在 GitHub 上编辑此页面