Index: rsstg.sql ================================================================== --- rsstg.sql +++ rsstg.sql @@ -34,10 +34,10 @@ create or replace view rsstg_order as select source_id, coalesce(last_scrape + make_interval(0,0,0,0,0,(60 / (coalesce(activity, 1)/7 + 1) )::integer), now() - interval '1 minute') as next_fetch from rsstg_source natural left join (select source_id, count(*) as activity from rsstg_post where - hour = extract('hour' from now()) + hour = extract('hour' from now())::smallint and posted > now() - interval '7 days' group by source_id) as act where enabled order by next_fetch;