The following bug has been logged online:
Bug reference: 5310
Logged by: Lothar Bongartz
Email address: lotharbongartz(at)hotmail(dot)com
PostgreSQL version: 8.4
Operating system: Windows XP Professioanl
Description: "NOT FOUND" throws "GetData to Procedure return failed."
in stored functions
Details:
A "NOT FOUND" condition in a stored function throws a "GetData to Procedure
return failed." error, which cannot be trapped by the EXCEPTION handling.
Example:
SELECT msg_id INTO v_nm FROM newmail WHERE memb_id=v_id;
The only way to avoid the complete failing of the stored function is to do a
check before:
IF EXISTS (SELECT * FROM newmail WHERE memb_id=v_id) THEN
SELECT msg_id INTO v_nm FROM newmail WHERE memb_id=v_id;
END IF;