Hello,

I am using PostgreSQL 8.0.1.

In a function, I try to use exception to catch sql errors:

begin
....
   begin
      exception
         WHEN  ???   THEN
   end;
...
end;

The place where I have ???, what I should put there please?

e.g.,
1. WHEN sqlcode = '02000' THEN
2. WHEN no_data then
3.  other ways?

From the 8.0 docs, I am not be able to find Constant values of all error codes.
http://www.postgresql.org/docs/8.0/static/errcodes-appendix.html

Please enlighten me.


Thanks,
Ying

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to