From: Alexey Shchepin Date: Sat, 18 May 2019 18:16:33 +0000 (+0300) Subject: Fix PostgreSQL compatibility in mod_offline_sql:remove_old_messages (#2695) X-Git-Tag: 19.05~14^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63e9b82a46cd944e0969d5662e0d44190c0df180;p=ejabberd Fix PostgreSQL compatibility in mod_offline_sql:remove_old_messages (#2695) --- diff --git a/src/mod_offline_sql.erl b/src/mod_offline_sql.erl index cb0efa51e..972316954 100644 --- a/src/mod_offline_sql.erl +++ b/src/mod_offline_sql.erl @@ -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"