On 11/08/2011 07:06 AM, Richard Broersma wrote:
> I'd be more maintainable to catch these errors in your client
> application.  Here you would reword these error messages according the
> business rules of your client application.
+1
It's not hard to create:
   CONSTRAINT some_constraint_name FOREIGN KEY col REFERENCES blah(id)
... then in the app, match "some_constraint_name" and map it to a 
suitable error. That's what I do and it works very well for all 
constraint types, not just foreign key constraints.
--
Craig Ringer