postgresql7.1 begin perform survey_response__remove(:response_id); return null; end; select survey_id, survey_response__initial_user_id(response_id) as user_id from survey_responses where response_id=:response_id