From 63e9b82a46cd944e0969d5662e0d44190c0df180 Mon Sep 17 00:00:00 2001 From: Alexey Shchepin Date: Sat, 18 May 2019 21:16:33 +0300 Subject: [PATCH] Fix PostgreSQL compatibility in mod_offline_sql:remove_old_messages (#2695) --- src/mod_offline_sql.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"