exception handling in plpgsql - Mailing list pgsql-hackers

From Sibtay Abbas
Subject exception handling in plpgsql
Date
Msg-id 20041231195714.6944.qmail@web50001.mail.yahoo.com
Whole thread Raw
Responses Re: exception handling in plpgsql
Re: exception handling in plpgsql
List pgsql-hackers
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?

    
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 'COPY ... FROM' inserts to btree, blocks on buffer writeout
Next
From: Andrew Dunstan
Date:
Subject: Re: exception handling in plpgsql