mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 02:23:49 +08:00
Add missing ORDER BY clauses to cagg_policy test
This commit is contained in:
parent
03defb33ef
commit
8c5a759765
@ -73,11 +73,11 @@ SELECT timescaledb_experimental.show_policies('mat_m1');
|
||||
(3 rows)
|
||||
|
||||
--Test coverage: new view for policies on CAggs
|
||||
SELECT * FROM timescaledb_experimental.policies;
|
||||
SELECT * FROM timescaledb_experimental.policies ORDER BY relation_name, proc_name;
|
||||
relation_name | relation_schema | schedule_interval | proc_schema | proc_name | config | hypertable_schema | hypertable_name
|
||||
---------------+-----------------+-------------------+-----------------------+-------------------------------------+---------------------------------------------------------------+-----------------------+----------------------------
|
||||
mat_m1 | public | @ 1 hour | _timescaledb_internal | policy_refresh_continuous_aggregate | {"end_offset": 1, "start_offset": 10, "mat_hypertable_id": 2} | _timescaledb_internal | _materialized_hypertable_2
|
||||
mat_m1 | public | @ 1 day | _timescaledb_internal | policy_compression | {"hypertable_id": 2, "compress_after": 11} | _timescaledb_internal | _materialized_hypertable_2
|
||||
mat_m1 | public | @ 1 hour | _timescaledb_internal | policy_refresh_continuous_aggregate | {"end_offset": 1, "start_offset": 10, "mat_hypertable_id": 2} | _timescaledb_internal | _materialized_hypertable_2
|
||||
mat_m1 | public | @ 1 day | _timescaledb_internal | policy_retention | {"drop_after": 20, "hypertable_id": 2} | _timescaledb_internal | _materialized_hypertable_2
|
||||
(3 rows)
|
||||
|
||||
@ -88,11 +88,11 @@ SELECT add_retention_policy('int_tab', 20);
|
||||
1003
|
||||
(1 row)
|
||||
|
||||
SELECT * FROM timescaledb_experimental.policies;
|
||||
SELECT * FROM timescaledb_experimental.policies ORDER BY relation_name, proc_name;
|
||||
relation_name | relation_schema | schedule_interval | proc_schema | proc_name | config | hypertable_schema | hypertable_name
|
||||
---------------+-----------------+-------------------+-----------------------+-------------------------------------+---------------------------------------------------------------+-----------------------+----------------------------
|
||||
mat_m1 | public | @ 1 hour | _timescaledb_internal | policy_refresh_continuous_aggregate | {"end_offset": 1, "start_offset": 10, "mat_hypertable_id": 2} | _timescaledb_internal | _materialized_hypertable_2
|
||||
mat_m1 | public | @ 1 day | _timescaledb_internal | policy_compression | {"hypertable_id": 2, "compress_after": 11} | _timescaledb_internal | _materialized_hypertable_2
|
||||
mat_m1 | public | @ 1 hour | _timescaledb_internal | policy_refresh_continuous_aggregate | {"end_offset": 1, "start_offset": 10, "mat_hypertable_id": 2} | _timescaledb_internal | _materialized_hypertable_2
|
||||
mat_m1 | public | @ 1 day | _timescaledb_internal | policy_retention | {"drop_after": 20, "hypertable_id": 2} | _timescaledb_internal | _materialized_hypertable_2
|
||||
(3 rows)
|
||||
|
||||
@ -539,11 +539,11 @@ SELECT timescaledb_experimental.show_policies('max_mat_view_date');
|
||||
(2 rows)
|
||||
|
||||
-- Remove all policies
|
||||
SELECT * FROM timescaledb_experimental.policies;
|
||||
SELECT * FROM timescaledb_experimental.policies ORDER BY relation_name, proc_name;
|
||||
relation_name | relation_schema | schedule_interval | proc_schema | proc_name | config | hypertable_schema | hypertable_name
|
||||
-------------------+-----------------+-------------------+-----------------------+-------------------------------------+--------------------------------------------------------------------------------+-----------------------+----------------------------
|
||||
max_mat_view_date | public | @ 1 day | _timescaledb_internal | policy_retention | {"drop_after": "@ 25 days", "hypertable_id": 5} | _timescaledb_internal | _materialized_hypertable_5
|
||||
max_mat_view_date | public | @ 1 hour | _timescaledb_internal | policy_refresh_continuous_aggregate | {"end_offset": "@ 1 day", "start_offset": "@ 15 days", "mat_hypertable_id": 5} | _timescaledb_internal | _materialized_hypertable_5
|
||||
max_mat_view_date | public | @ 1 day | _timescaledb_internal | policy_retention | {"drop_after": "@ 25 days", "hypertable_id": 5} | _timescaledb_internal | _materialized_hypertable_5
|
||||
(2 rows)
|
||||
|
||||
SELECT timescaledb_experimental.remove_all_policies(NULL); -- should fail
|
||||
|
@ -52,11 +52,11 @@ SELECT timescaledb_experimental.add_policies('mat_m1', refresh_start_offset => 1
|
||||
SELECT timescaledb_experimental.show_policies('mat_m1');
|
||||
|
||||
--Test coverage: new view for policies on CAggs
|
||||
SELECT * FROM timescaledb_experimental.policies;
|
||||
SELECT * FROM timescaledb_experimental.policies ORDER BY relation_name, proc_name;
|
||||
|
||||
--Test coverage: new view for policies only shows the policies for CAggs
|
||||
SELECT add_retention_policy('int_tab', 20);
|
||||
SELECT * FROM timescaledb_experimental.policies;
|
||||
SELECT * FROM timescaledb_experimental.policies ORDER BY relation_name, proc_name;
|
||||
SELECT remove_retention_policy('int_tab');
|
||||
|
||||
-- Alter policies
|
||||
@ -230,7 +230,7 @@ SELECT timescaledb_experimental.add_policies('max_mat_view_date', refresh_start_
|
||||
SELECT timescaledb_experimental.show_policies('max_mat_view_date');
|
||||
|
||||
-- Remove all policies
|
||||
SELECT * FROM timescaledb_experimental.policies;
|
||||
SELECT * FROM timescaledb_experimental.policies ORDER BY relation_name, proc_name;
|
||||
SELECT timescaledb_experimental.remove_all_policies(NULL); -- should fail
|
||||
SELECT timescaledb_experimental.remove_all_policies('continuous_agg_max_mat_date'); -- should fail
|
||||
SELECT timescaledb_experimental.remove_all_policies('max_mat_view_date', false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user