TENGO UN PROBLEMA CON UNA FUNCION POR FAVOR CHEQUEEN Y PODRIAN DECIRME QUE ESTA MAL O QUE ME FALTA
CREATE OR REPLACE FUNCTION actafe()
RETURNS SETOF int4 AS
$BODY$
DECLARE
cCodAfe char(5)=null;
nResultado integer=0;
xCurSer refcursor;
xCurArt refcursor;
cCodSer char(8);
nPreSer numeric(12,2);
nPctAfe integer;
nNewPre numeric(12,2)=0;
BEGIN
cCodAfe:=1;
nResultado:=0;
Open xCurSer FOR SELECT * from a11pafs WHERE "cCodAfe" = cCodAfe;
FETCH xCurSer INTO cCodSer;
While found LOOP
Select nPreSer="nPreSer" from A11MSER Where "cCodSer"=cCodSer;
Select nPctAfe="nPctAfe" from A11MAFE Where "cCodAfe"=cCodAfe;
nNewPre:=nPreSer*(nPctAfe/100);
UPDATE A11PAFS set "nPreven"=nNewPre where "cCodSer" = cCodSer and "cCodAfe"=cCodAfe;
FETCH xCurSer INTO cCodSer;
End Loop;
CLOSE xCurSer;
COMMIT;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
ALTER FUNCTION actafe() OWNER TO postgres;
Select actafe();
CUANDO LA EJECUTO ME SALE ESTE ERROR:
ERROR: SELECT query has no destination for result data
HINT: If you want to discard the results, use PERFORM instead.
CONTEXT: PL/pgSQL function "actafe" line 16 at SQL statement
QUE DEBO HACER .
GRACIAS POR LA AYUDA



