25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Fix PostgreSQL compatibility in mod_offline_sql:remove_old_messages (#2695)

This commit is contained in:
Alexey Shchepin 2019-05-18 21:16:33 +03:00
parent 937f07a4cc
commit 63e9b82a46

View File

@ -94,7 +94,7 @@ remove_old_messages(Days, LServer) ->
ejabberd_sql:sql_query_t(
?SQL("DELETE FROM spool"
" WHERE created_at <"
" NOW() - INTERVAL '%(Days)d DAY'"));
" NOW() - %(Days)d * INTERVAL '1 DAY'"));
(_, _) ->
ejabberd_sql:sql_query_t(
?SQL("DELETE FROM spool"