select w.channel_id
from weblogger_channels w
where w.package_id = :package_id
and w.user_id is null
select count(*)
from rss_gen_subscrs s,
acs_sc_impls i,
weblogger_channels w
where s.summary_context_id = w.channel_id
and w.package_id = :package_id
and w.user_id is null
and s.impl_id = i.impl_id
and i.impl_name = 'pinds_blog_entries'
and i.impl_owner_name = 'lars-blogger'
select w.channel_id
from weblogger_channels w
where w.package_id = :package_id
and w.user_id = :creation_user
select count(*)
from rss_gen_subscrs s,
acs_sc_impls i,
weblogger_channels w
where s.summary_context_id = w.channel_id
and w.user_id = :creation_user
and w.package_id = :package_id
and s.impl_id = i.impl_id
and i.impl_name = 'pinds_blog_entries'
and i.impl_owner_name = 'lars-blogger'
update rss_gen_subscrs
set channel_title = :channel_title,
channel_link = :channel_link
where subscr_id = :subscr_id
select screen_name from users where user_id = :creation_user
select p.package_id
from apm_packages p, acs_object_party_privilege_map perm
where p.package_key = 'lars-blogger'
and p.package_id = perm.object_id
and perm.privilege = 'create'
and perm.party_id = :user_id
select count(*)
from pinds_blog_entries
where package_id = :package_id
and draft_p = 'f'