exception handling in plpgsql

From: Sibtay Abbas <sibtay_abbas(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: exception handling in plpgsql
Date: 2004-12-31 19:57:14
Message-ID: 20041231195714.6944.qmail@web50001.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-12-31 20:18:39 Re: exception handling in plpgsql
Previous Message lsunley 2004-12-31 19:55:26 Re: sysv_shmem potential problem