From 6b3160cf1e26cd28cc898a5a4ff83d98a3d91e07 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 6 Aug 2015 19:28:58 +0300 Subject: [PATCH] purge_feed: remove obsolete postgresql queries --- include/functions.php | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/include/functions.php b/include/functions.php index de48744a..d90855ea 100644 --- a/include/functions.php +++ b/include/functions.php @@ -248,27 +248,13 @@ if (!$purge_unread) $query_limit = " unread = false AND "; if (DB_TYPE == "pgsql") { - $pg_version = get_pgsql_version(); - - if (preg_match("/^7\./", $pg_version) || preg_match("/^8\.0/", $pg_version)) { - - $result = db_query("DELETE FROM ttrss_user_entries WHERE - ttrss_entries.id = ref_id AND - marked = false AND - feed_id = '$feed_id' AND - $query_limit - ttrss_entries.date_updated < NOW() - INTERVAL '$purge_interval days'"); - - } else { - - $result = db_query("DELETE FROM ttrss_user_entries - USING ttrss_entries - WHERE ttrss_entries.id = ref_id AND - marked = false AND - feed_id = '$feed_id' AND - $query_limit - ttrss_entries.date_updated < NOW() - INTERVAL '$purge_interval days'"); - } + $result = db_query("DELETE FROM ttrss_user_entries + USING ttrss_entries + WHERE ttrss_entries.id = ref_id AND + marked = false AND + feed_id = '$feed_id' AND + $query_limit + ttrss_entries.date_updated < NOW() - INTERVAL '$purge_interval days'"); } else { -- 2.39.5