Re: exception handling in plpgsql - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: exception handling in plpgsql
Date
Msg-id 41D5B41F.30500@dunslane.net
Whole thread Raw
In response to exception handling in plpgsql  (Sibtay Abbas <sibtay_abbas@yahoo.com>)
Responses Re: exception handling in plpgsql
List pgsql-hackers
PEBKAC.

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

cheers

andrew

Sibtay Abbas wrote:

>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 the following error 
>ERROR:  unrecognized exception condition "no_data"
>
>How can i rectify this error?
>
>
>    
>  
>


pgsql-hackers by date:

Previous
From: Sibtay Abbas
Date:
Subject: exception handling in plpgsql
Next
From: lsunley@mb.sympatico.ca
Date:
Subject: sysv_shmem potential problem