mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 01:15:46 +08:00
Postgres: Fix timeGroup macro converts long intervals to invalid numbers when TimescaleDB is enabled (#31179)
Fixes #27253
This commit is contained in:
@ -107,7 +107,7 @@ func (m *postgresMacroEngine) evaluateMacro(name string, args []string) (string,
|
||||
}
|
||||
|
||||
if m.timescaledb {
|
||||
return fmt.Sprintf("time_bucket('%vs',%s)", interval.Seconds(), args[0]), nil
|
||||
return fmt.Sprintf("time_bucket('%.0fs',%s)", interval.Seconds(), args[0]), nil
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
|
Reference in New Issue
Block a user