Please could timestamp9 be supported within continuous aggregate time_buckets.
We have a table that makes use of @fvannee 's timestamp9 (nanosecond precision) custom data type as the time_column. For example:
create table sensor
(
timestamp timestamp9 not null,
listing_id bigint not null,
metric bigint not null,
constraint sensor_pkey
primary key (listing_id, timestamp)
);
SELECT create_hypertable('sensor', 'timestamp');
When I tried to create a continuous aggregate on the table as follows:
CREATE VIEW sensor_summary
WITH (timescaledb.continuous)
AS
SELECT
time_bucket('1 hour', timestamp) as bucket,
listing_id,
avg(metric) as metric_avg
FROM
sensor
GROUP BY bucket, listing_id;
The operation is not supported:
[42883] ERROR: function time_bucket(unknown, timestamp9) does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts. Position: 70
Adding a cast in the time_bucket function, eg. timestamp::timestamp gives a different error:
[XX000] ERROR: time_bucket function for continuous aggregate query should be called on the dimension column of the hypertable
Please could timestamp9 be supported within continuous aggregate time_buckets.
We have a table that makes use of @fvannee 's timestamp9 (nanosecond precision) custom data type as the time_column. For example:
When I tried to create a continuous aggregate on the table as follows:
The operation is not supported:
Adding a cast in the time_bucket function, eg. timestamp::timestamp gives a different error: