Skip to content

Commit 21384c3

Browse files
committed
Remove dependency on _timescaledb_catalog.continuous_aggs_bucket_function table
1 parent bc49e39 commit 21384c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

diagnostic.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ BEGIN
147147
END AS range
148148
FROM _timescaledb_catalog.continuous_aggs_materialization_ranges r
149149
JOIN _timescaledb_catalog.continuous_agg c ON c.mat_hypertable_id=r.materialization_id
150-
JOIN _timescaledb_catalog.continuous_aggs_bucket_function f on f.mat_hypertable_id=c.mat_hypertable_id
150+
JOIN LATERAL(SELECT * FROM _timescaledb_functions.cagg_get_bucket_function_info(c.mat_hypertable_id)) f on true
151151
JOIN _timescaledb_catalog.dimension d ON d.hypertable_id=c.mat_hypertable_id
152152
WHERE
153153
CASE
@@ -176,7 +176,7 @@ BEGIN
176176
END AS chunk_width,
177177
f.bucket_width cagg_width
178178
FROM _timescaledb_catalog.continuous_agg c
179-
JOIN _timescaledb_catalog.continuous_aggs_bucket_function f ON f.mat_hypertable_id=c.mat_hypertable_id
179+
JOIN LATERAL(SELECT * FROM _timescaledb_functions.cagg_get_bucket_function_info(c.mat_hypertable_id)) f on true
180180
JOIN _timescaledb_catalog.dimension d ON d.hypertable_id=c.mat_hypertable_id
181181
WHERE
182182
CASE

0 commit comments

Comments
 (0)