postgresql7.1 select tt.ticket_id as id, tt.subject, tt.priority, tt.severity, tt.category_id, cr.mime_type, cr.content as description from ttracker_tickets tt, cr_revisions cr where tt.ticket_id = :ticket_id and cr.revision_id = content_item__get_live_revision(:ticket_id)