创建下面的函数:CREATE FUNCTION "public"."usp_cleanreport" (integer, varchar, integer, integer) RETURNS integer AS
$body$
begin
--Category_ID integer, Report_Type varchar [], Report_Year integer, Report_Month integer
if $2='Age'
then
  delete from stagereport where Category_ID=$1 and Report_Year=$3 and Report_Month=$4;
elsif $2='Balance'
then
  delete from stbalancereport where Category_ID=$1 and Report_Year=$3 and Report_Month=$4;
elsif $2='Inventory'
then
  delete from ststockreport where Category_ID=$1 and Report_Year=$3 and Report_Month=$4;
end if;select 1;END;
$body$
LANGUAGE 'plpgsql' STABLE CALLED ON NULL INPUT SECURITY INVOKER;调用函数时 select usp_cleanreport(3,'Balance',2006,10); 
提示:ERROR:  DELETE is not allowed in a non-volatile function
CONTEXT:  SQL statement "delete from stbalancereport where Category_ID= $1  and Report_Year= $2  and Report_Month= $3 "
PL/pgSQL function "usp_cleanreport" line 8 at SQL statement请问应如何解决? 谢谢!