postgresql7.1
select mail_class_id, name
from ml_mail_classes
where acs_permission__permission_p(mail_class_id, :user_id, 'read') = 't'
select list_id, name
from ml_mailing_lists
where acs_permission__permission_p(list_id, :user_id, 'admin') = 't'
and expiration_date > current_timestamp
and package_id = :package_id
select selection_id, title
from us_selections
where acs_permission__permission_p(selection_id, :user_id, 'read') = 't'