BUG #5310: "NOT FOUND" throws "GetData to Procedure return failed." in stored functions

From: "Lothar Bongartz" <lotharbongartz(at)hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5310: "NOT FOUND" throws "GetData to Procedure return failed." in stored functions
Date: 2010-02-03 16:14:28
Message-ID: 201002031614.o13GESkb075957@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


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;

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John 2010-02-03 17:34:14 BUG #5311: Won't install.
Previous Message IP 2010-02-03 13:21:35 Inconsistent PHP pg_result_error_field PGSQL_DIAG_SOURCE_FUNCTION across instalations