postgresql7.1 select name as ticket_name, person__name(:caller_id) as sender_fullname, (select email from parties where party_id = :caller_id) as sender_email from ttl_v_tickets where ticket_id = :ticket_id