Tom Lane <t...@sss.pgh.pa.us> writes: > Why don't you just choose better names for your constraints?
A word versus a sentence. It's a big difference that greatly improves the user experience. > I'd argue that the proposed change might actually be a net loss for usability, if it entirely obscures the fact that what happened was a check-constraint violation. I understand, I'm looking at it from the point of view of the end user who is using an application. This application will not need to handle the message if the database generates a more 'user-friendly' message. > It's also not very clear why we'd stop with check constraints, if the desire is to get rid of database-produced error messages in favor of something that somebody likes better. The idea is just to be able to define a different message. if I have to use a trigger to set a different message, then I have to write the same rule twice, in CHECK and TRIGGER, which is redundant. Best regards, Miguel Ferreira