Relevant system information:
postgres --version): 12.3\dx in psql): 1.7.1Describe the bug
I am trying to create a continuous aggregate view using time_bucket with origin parameter set, but I am getting error. It works without origin or offset.
To Reproduce
Steps to reproduce the behavior:
origin parameter of time_bucket:# CREATE VIEW test_hourly WITH (timescaledb.continuous) AS SELECT TIME_BUCKET('1 hours'::interval, ts::timestamp, '1970-01-01'::timestamp) AS period, AVG(value), MIN(value), MAX(value) FROM measurements GROUP BY period;
ERROR: no valid bucketing function found for continuous aggregate query
origin is not specified:# CREATE VIEW test_hourly WITH (timescaledb.continuous) AS SELECT TIME_BUCKET('1 hours'::interval, ts::timestamp) AS period, AVG(value), MIN(value), MAX(value) FROM measurements GROUP BY period;
CREATE VIEW
Expected behavior
Parameter origin should be allowed (and obeyed).
Actual behavior
Creating a continuous aggregate view fails.
Screenshots
/
Additional context
offset (so it can't be used as a workaround)origin in time_bucket docsI upvote this.
It'd be nice to have aggregation by day not aligned at midnight UTC.
I also upvote this. It would be very helpfull to me.
Also please consider having the offset being pass as a column of the table as the timestamp is, not only a fixed value.
This is a major feature... definitely needs to be implemented... +1
Most helpful comment
I also upvote this. It would be very helpfull to me.
Also please consider having the offset being pass as a column of the table as the timestamp is, not only a fixed value.