Skip to content

Instantly share code, notes, and snippets.

@HenryQW
Last active February 9, 2018 12:04
Show Gist options
  • Save HenryQW/8a38f4d275d62cccd9df96706ec36754 to your computer and use it in GitHub Desktop.
Save HenryQW/8a38f4d275d62cccd9df96706ec36754 to your computer and use it in GitHub Desktop.
Purge ttrss old feeds in postgres
delete
from
ttrss_entries
where
id in(
select
id
from
ttrss_entries
inner join ttrss_user_entries on
ttrss_entries.id = ttrss_user_entries.ref_id
where
date_entered < now()- interval '60 days'
and marked = false
and unread = false
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment