Time weighted averages with continuous aggregates

Dear Forum,

I have tried using time_weighted averages of my hypertable in a continuous aggregate, and timescale tells me that only immutable functions are supported (error output below). Is this expected behavior and if yes, is it still possible to make this work?

Thanks for your help in advance!


The Error:
SQL-Fehler [0A000]: ERROR: only immutable functions supported in continuous aggregate view
Hinweis: Make sure all functions in the continuous aggregate definition have IMMUTABLE volatility. Note that functions or expressions may be IMMUTABLE for one data type, but STABLE or VOLATILE for another

1 Like

Hi @rabmat

From: time_weight

I would guess you have problems with your parameters, in case: please make sure to use the correct timestamp with timezone



Would that be true for counter_agg also? I see the same error message, and my time column is defined as timestamp. So, to use counter_agg in a continuous materialized view, I need to change the time column from timestamp to timestamptz?