timescaledb_information.continuous_aggregates

Get metadata and settings information for continuous aggregates.

Available Columns

NameDescription
hypertable_schema(NAME) Schema of the hypertable from the continuous aggregate view
hypertable_name(NAME) Name of the hypertable from the continuous aggregate view
view_schema(NAME) Schema for continuous aggregate view
view_name(NAME) User supplied name for continuous aggregate view
view_owner(NAME) Owner of the continuous aggregate view
materialized_only(BOOLEAN) Return only materialized data when querying the continuous aggregate view.
materialization_hypertable_schema(NAME) Schema of the underlying materialization table
materialization_hypertable_name(NAME) Name of the underlying materialization table
view_definition(TEXT) SELECT query for continuous aggregate view

Sample Usage

  1. SELECT * FROM timescaledb_information.continuous_aggregates;
  2. -[ RECORD 1 ]---------------------+-------------------------------------------------
  3. hypertable_schema | public
  4. hypertable_name | foo
  5. view_schema | public
  6. view_name | contagg_view
  7. view_owner | postgres
  8. materialized_only | f
  9. materialization_hypertable_schema | _timescaledb_internal
  10. materialization_hypertable_name | _materialized_hypertable_2
  11. view_definition | SELECT foo.a, +
  12. | COUNT(foo.b) AS countb +
  13. | FROM foo +
  14. | GROUP BY (time_bucket('1 day', foo.a)), foo.a;