mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-21 05:04:32 +08:00
Fix post repair tests
Commit 3f9cb3c2 introduced new repair tests for broken Continuous Aggregates with JOIN clause but in the post.repair.sql we not properly calling the post.repair.cagg_joins.sql because a wrong usage of psql `if` statement.
This commit is contained in:
parent
d32224a914
commit
b16bf3b100
@ -6,12 +6,10 @@ SELECT extversion < '2.10.0' AS test_repair_dimension
|
|||||||
FROM pg_extension
|
FROM pg_extension
|
||||||
WHERE extname = 'timescaledb' \gset
|
WHERE extname = 'timescaledb' \gset
|
||||||
|
|
||||||
SELECT extversion >= '2.10.0' AS has_cagg_joins
|
SELECT extversion >= '2.10.0' AND :'TEST_VERSION' >= 'v8' AS test_repair_cagg_joins
|
||||||
FROM pg_extension
|
FROM pg_extension
|
||||||
WHERE extname = 'timescaledb' \gset
|
WHERE extname = 'timescaledb' \gset
|
||||||
|
|
||||||
SELECT :'TEST_VERSION' >= 'v8' AS is_GTE_v8 \gset
|
|
||||||
|
|
||||||
\if :test_repair_dimension
|
\if :test_repair_dimension
|
||||||
-- Re-add the dropped foreign key constraint that was dropped for
|
-- Re-add the dropped foreign key constraint that was dropped for
|
||||||
-- repair testing.
|
-- repair testing.
|
||||||
@ -20,7 +18,7 @@ SELECT :'TEST_VERSION' >= 'v8' AS is_GTE_v8 \gset
|
|||||||
FOREIGN KEY (dimension_slice_id) REFERENCES _timescaledb_catalog.dimension_slice (id);
|
FOREIGN KEY (dimension_slice_id) REFERENCES _timescaledb_catalog.dimension_slice (id);
|
||||||
\endif
|
\endif
|
||||||
|
|
||||||
\if :has_cagg_joins AND :is_GTE_v8
|
\if :test_repair_cagg_joins
|
||||||
--Check if the repaired cagg with joins work alright now
|
--Check if the repaired cagg with joins work alright now
|
||||||
\ir post.repair.cagg_joins.sql
|
\ir post.repair.cagg_joins.sql
|
||||||
\endif
|
\endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user