Re: [HACKERS] exception handling in plpgsql

2005-01-01 Thread Korry
I am using the following sytex to handle exceptions in plpgsql (I am using postgres 8 rc1) some code EXCEPTION WHEN NO_DATA THEN RAISE NOTICE 'NO DATA'; WHEN OTHERS THEN RAISE NOTICE 'An exception occurred'; RETURN emp_rec; and i receive the

Re: [HACKERS] exception handling in plpgsql

2005-01-01 Thread Michael Fuhr
On Sat, Jan 01, 2005 at 10:04:57AM -0500, Korry wrote: It seems you can???t trap every condition listed in errocodes- appendix.html; in particular, you can't trap SUCCESSFUL_COMPLETION, any of the conditions listed in the WARNING category, or any of the conditions listed in the NO DATA

Re: [HACKERS] exception handling in plpgsql

2005-01-01 Thread Tom Lane
Korry [EMAIL PROTECTED] writes: It seems you can’t trap every condition listed in errocodes- appendix.html; in particular, you can’t trap SUCCESSFUL_COMPLETION, any of the conditions listed in the WARNING category, or any of the conditions listed in the NO DATA category. (At least through 8.0

Re: [HACKERS] exception handling in plpgsql

2005-01-01 Thread Korry
On Sat, 2005-01-01 at 14:10 -0500, Tom Lane wrote: Korry [EMAIL PROTECTED] writes: It seems you cant trap every condition listed in errocodes- appendix.html; in particular, you cant trap SUCCESSFUL_COMPLETION, any of the conditions listed in the WARNING category, or any of the conditions

[HACKERS] exception handling in plpgsql

2004-12-31 Thread Sibtay Abbas
hello I am using the following sytex to handle exceptions in plpgsql (I am using postgres 8 rc1) some code EXCEPTION WHEN NO_DATA THEN RAISE NOTICE 'NO DATA'; WHEN OTHERS THEN RAISE NOTICE 'An exception occurred'; RETURN emp_rec; and i receive

Re: [HACKERS] exception handling in plpgsql

2004-12-31 Thread Michael Fuhr
On Fri, Dec 31, 2004 at 03:18:39PM -0500, Andrew Dunstan wrote: It has told you what the problem is. Use a handler for an exception that actually exists. To see what these are, read http://developer.postgresql.org/docs/postgres/plpgsql-errors-and-messages.html As the PL/pgSQL Trapping

Re: [HACKERS] exception handling in plpgsql

2004-12-31 Thread Andrew Dunstan
Michael Fuhr wrote: On Fri, Dec 31, 2004 at 03:18:39PM -0500, Andrew Dunstan wrote: It has told you what the problem is. Use a handler for an exception that actually exists. To see what these are, read http://developer.postgresql.org/docs/postgres/plpgsql-errors-and-messages.html As the