Commit fda33dbd authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

PostgreSQL doesn't know GROUP_CONCAT()

parent e257b7de
......@@ -802,8 +802,11 @@ sub monitor {
sum(work_done/(strftime('%s','now')-strftime('%s',born)))/count(*), },
'pgsql' => qq{ sum(work_done/(EXTRACT(EPOCH FROM CURRENT_TIMESTAMP - born))),
sum(work_done/(EXTRACT(EPOCH FROM CURRENT_TIMESTAMP - born)))/count(*), },
}->{ $self->dbc->driver }. {
'mysql' => qq{ group_concat(DISTINCT logic_name) },
'sqlite' => qq{ group_concat(DISTINCT logic_name) },
'pgsql' => qq{ string_agg(DISTINCT logic_name, '') },
}->{ $self->dbc->driver }. qq{
group_concat(DISTINCT logic_name)
FROM worker w
LEFT JOIN analysis_base USING (analysis_id)
WHERE w.status!='DEAD'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment