mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 10:33:27 +08:00
Add license information to files missing it and fix the license check script to honor the return code of both the apache license check and the TSL license check. Previously errors occurring during apache license check would not be reflected in the return code of the script, so only the TSL license check was effective.
33 lines
1.3 KiB
SQL
33 lines
1.3 KiB
SQL
-- This file and its contents are licensed under the Apache License 2.0.
|
|
-- Please see the included NOTICE for copyright information and
|
|
-- LICENSE-APACHE for a copy of the license.
|
|
|
|
--telemetry tests that require a community license
|
|
|
|
SELECT json_object_field(get_telemetry_report(always_display_report := true)::json,'num_continuous_aggs');
|
|
SELECT json_object_field(get_telemetry_report(always_display_report := true)::json,'num_hypertables');
|
|
|
|
-- check telemetry picks up flagged content from metadata
|
|
SELECT json_object_field(get_telemetry_report(always_display_report := true)::json,'db_metadata');
|
|
|
|
-- check timescaledb_telemetry.cloud
|
|
SELECT json_object_field(get_telemetry_report(always_display_report := true)::json,'instance_metadata');
|
|
|
|
|
|
--create a continuous agg
|
|
CREATE TABLE device_readings (
|
|
observation_time TIMESTAMPTZ NOT NULL
|
|
);
|
|
SELECT table_name FROM create_hypertable('device_readings', 'observation_time');
|
|
CREATE VIEW device_summary
|
|
WITH (timescaledb.continuous) AS
|
|
SELECT
|
|
time_bucket('1 hour', observation_time) as bucket,
|
|
min(observation_time)
|
|
FROM
|
|
device_readings
|
|
GROUP BY bucket;
|
|
|
|
SELECT json_object_field(get_telemetry_report(always_display_report := true)::json,'num_continuous_aggs');
|
|
SELECT json_object_field(get_telemetry_report(always_display_report := true)::json,'num_hypertables');
|