timescaledb_information.continuous_aggregates

Get metadata and settings information for continuous aggregates.

Available Columns

NameTypeDescription
hypertable_schemaTEXTSchema of the hypertable from the continuous aggregate view
hypertable_nameTEXTName of the hypertable from the continuous aggregate view
view_schemaTEXTSchema for continuous aggregate view
view_nameTEXTUser supplied name for continuous aggregate view
view_ownerTEXTOwner of the continuous aggregate view
materialized_onlyBOOLEANReturn only materialized data when querying the continuous aggregate view.
materialization_hypertable_schemaTEXTSchema of the underlying materialization table
materialization_hypertable_nameTEXTName of the underlying materialization table
view_definitionTEXTSELECT 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;