purge_feed: remove obsolete postgresql queries
This commit is contained in:
parent
ecbb32925e
commit
6b3160cf1e
|
@ -248,27 +248,13 @@
|
||||||
if (!$purge_unread) $query_limit = " unread = false AND ";
|
if (!$purge_unread) $query_limit = " unread = false AND ";
|
||||||
|
|
||||||
if (DB_TYPE == "pgsql") {
|
if (DB_TYPE == "pgsql") {
|
||||||
$pg_version = get_pgsql_version();
|
$result = db_query("DELETE FROM ttrss_user_entries
|
||||||
|
USING ttrss_entries
|
||||||
if (preg_match("/^7\./", $pg_version) || preg_match("/^8\.0/", $pg_version)) {
|
WHERE ttrss_entries.id = ref_id AND
|
||||||
|
marked = false AND
|
||||||
$result = db_query("DELETE FROM ttrss_user_entries WHERE
|
feed_id = '$feed_id' AND
|
||||||
ttrss_entries.id = ref_id AND
|
$query_limit
|
||||||
marked = false AND
|
ttrss_entries.date_updated < NOW() - INTERVAL '$purge_interval days'");
|
||||||
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'");
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue