24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-09-27 14:30:55 +02: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( ejabberd_sql:sql_query_t(
?SQL("DELETE FROM spool" ?SQL("DELETE FROM spool"
" WHERE created_at <" " WHERE created_at <"
" NOW() - INTERVAL '%(Days)d DAY'")); " NOW() - %(Days)d * INTERVAL '1 DAY'"));
(_, _) -> (_, _) ->
ejabberd_sql:sql_query_t( ejabberd_sql:sql_query_t(
?SQL("DELETE FROM spool" ?SQL("DELETE FROM spool"