postgresql7.1 select j.locale, j.sender_email, j.track_links_p, j.subject, j.text_header, j.text_body, j.text_footer, j.html_header, j.html_body, j.html_footer, j.mime_type, j.state, to_char(j.scheduled_date, :format) as scheduled_date, c.name as class_name, c.comments as class_comment, m.name as list_name, m.comments as list_comment, s.title as selection_name, s.description as selection_desc from ml_mail_jobs j inner join ml_mail_classes c using (mail_class_id) left outer join ml_mailing_lists m on (j.list_id = m.list_id and m.package_id = :package_id) left outer join us_selections s on (j.selection_id = s.selection_id) where j.mail_job_id = :mail_job_id select content_item__delete(:file_id);