Changed order of function and view declaration. Change function update_stock_rating(). Changed function stock_info_summary() from plpgsql to sql for efficiency