Hi!
I think I have found a weird syntactic inconsistency while referring the schema and table when using the time_bucket function:
This query below runs properly, as usual:
select
COUNT (*)
from
telegraf."UVI"
group by timestamp;
But this one throws an error:
select
time_bucket('5 minutes', timestamp) as tb,
COUNT (*)
from
telegraf."UVI"
group by tb;
SQL Error [42883]: ERROR: function time_bucket(unknown, timestamp without time zone) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Position: 10Error position: line: 2 pos: 9
However, if I use a Dbeaver console on the needed schema (‘telegraf’) it runs properly:
tb |count|
-----------------------±----+
2022-06-10 06:30:00.000| 6|
2022-05-04 11:55:00.000| 4|
2022-06-08 05:15:00.000| 4|
2022-06-27 12:30:00.000| 3|
2022-05-12 07:10:00.000| 6|
2022-04-08 06:10:00.000| 6|
2022-04-21 14:35:00.000| 4|
2022-06-15 08:30:00.000| 6|
2022-06-06 08:35:00.000| 4|
2022-06-28 10:45:00.000| 4|
2022-04-08 06:20:00.000| 6|
2022-05-19 14:45:00.000| 2|
I believe this is because the hypertable was created by using only the table name instead of the full name (schema.table), is’n it?
What’s the better of the way to fix this issue?
Thank you!