postgresql7.2
where last_scanned < (now() - '00:48:00'::time)
select source_id,
feed_url,
last_modified
from na_sources
$time_limit
order by last_scanned asc
$limit_sql
limit $limit
select na_source__new (
null, -- object_id
:feed_url,
:link,
:channel_title,
:description,
:last_modified,
'1',
:package_id,
:user_id,
:creation_ip
)
now()
:pub_date
select na_item__new (
:source_id,
:link,
:guid,
boolean :permalink_p,
:title,
:description,
:content_encoded
);
select na_item__new (
:source_id,
:link,
:guid,
:original_guid,
boolean :permalink_p,
:title,
:description,
:content_encoded,
:author,
coalesce(:pub_date, current_timestamp)
);
select na_source__delete(
:source_id
);