mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 02:23:49 +08:00
Change start and end interval for policy in test
If a hypertable has a time type that is a date, any interval of less than a day will be truncated to the same day. This created a time-triggered test failure in `continuous_aggs_policy` and this commit changes it to use full days for the start and end interval.
This commit is contained in:
parent
9e6609cdad
commit
5a5255e6b2
@ -133,15 +133,15 @@ CREATE MATERIALIZED VIEW max_mat_view_date
|
||||
FROM continuous_agg_max_mat_date
|
||||
GROUP BY 1;
|
||||
\set ON_ERROR_STOP 0
|
||||
SELECT add_refresh_continuous_aggregate_policy('max_mat_view_date', '1 day'::interval, 10 , '1 h'::interval);
|
||||
SELECT add_refresh_continuous_aggregate_policy('max_mat_view_date', '2 days'::interval, 10 , '1 day'::interval);
|
||||
ERROR: invalid parameter value for end_interval
|
||||
\set ON_ERROR_STOP 1
|
||||
SELECT add_refresh_continuous_aggregate_policy('max_mat_view_date', '1 day'::interval, '1 h'::interval , '1 h'::interval) as job_id \gset
|
||||
SELECT add_refresh_continuous_aggregate_policy('max_mat_view_date', '2 day'::interval, '1 day'::interval , '1 day'::interval) as job_id \gset
|
||||
SELECT config FROM _timescaledb_config.bgw_job
|
||||
WHERE id = :job_id;
|
||||
config
|
||||
-----------------------------------------------------------------------------------
|
||||
{"end_interval": "@ 1 hour", "start_interval": "@ 1 day", "mat_hypertable_id": 4}
|
||||
{"end_interval": "@ 1 day", "start_interval": "@ 2 days", "mat_hypertable_id": 4}
|
||||
(1 row)
|
||||
|
||||
INSERT INTO continuous_agg_max_mat_date
|
||||
|
@ -86,9 +86,9 @@ CREATE MATERIALIZED VIEW max_mat_view_date
|
||||
GROUP BY 1;
|
||||
|
||||
\set ON_ERROR_STOP 0
|
||||
SELECT add_refresh_continuous_aggregate_policy('max_mat_view_date', '1 day'::interval, 10 , '1 h'::interval);
|
||||
SELECT add_refresh_continuous_aggregate_policy('max_mat_view_date', '2 days'::interval, 10 , '1 day'::interval);
|
||||
\set ON_ERROR_STOP 1
|
||||
SELECT add_refresh_continuous_aggregate_policy('max_mat_view_date', '1 day'::interval, '1 h'::interval , '1 h'::interval) as job_id \gset
|
||||
SELECT add_refresh_continuous_aggregate_policy('max_mat_view_date', '2 day'::interval, '1 day'::interval , '1 day'::interval) as job_id \gset
|
||||
SELECT config FROM _timescaledb_config.bgw_job
|
||||
WHERE id = :job_id;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user