Hi,
i try do achieve that my database checks every entry on insert and update and
returns german error messages, so my frontend knows what's wrong and can show
some reasonable error messages to the user.
i wrote a trigger who checks BEFORE every insert and updtae and returns error
messages if new values are not acceptable.
one of my problems:
if i have a value like bool or int2 and the frontend is html and just takes
the input from a textfield, the backend returns an error before executing the
trigger beacuse the values cant be parsed into the correct type.
But should not the trigger be called BEFORE inserting?
It seems not, maybe just because the NEW record has to be filled and with a
mismatching type it can't be done!?
Bad thing about it: my trigger should report every error. but it is never
executed when the type parsing fails.
I just dont want to put any error handling code in my frontend. I just want
the backend to return something like
"ERROR: errormessage1; ERROR: errormessage2;"
to return all errors on all fields.
Can anybody tell me how to make a really good and flexible error processing
with postgreSQL??
janning