"Robert Wimmer" <seppwimmer@hotmail.com> writes:
> my problem is, all plpgsql does is fine. but you do not get any errorcode
> during the function.
I'm afraid you're stuck. At some point we're going to extend RAISE to
allow you to specify a SQLSTATE code, but it didn't get done for 8.0.
regards, tom lane