I have a function/trigger. Within this function I perform, say, a cast. Is
there any way of testing whether the cast was successful (e.g. text to
number, and the text is not numeric only results in an error), so that I can
proceed accordingly? What about an UPDATE (not wait until the end
COMMIT/ROLLBACK)?
So, the general question might be: how can I catch backend errors at the
source?