I want to trap this exception...
ERROR: nextval: reached maximum value of sequence
...and print a user friendly message. But I can't figure out what exception code to test
when ??? then
raise exception 'Range too small.';
I looked through the postgres exception codes in the appendix, but couldn't find
the appropriate exception. WHY don't they match up the error message names??? Is there some
trick to making the connection from a psql error message to the related exception?
(So far I just go with past experience, but it would be nice if there was a system).
- Leon Starr