Re: [GENERAL] Custom Constraint Violation Errors

2011-11-07 Thread Craig Ringer
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 FOREIG

Re: [GENERAL] Custom Constraint Violation Errors

2011-11-07 Thread Richard Broersma
On Mon, Nov 7, 2011 at 2:47 PM, Michael Musenbrock wrote: > was intentionally looking for a trigger firing on violating of an > already existing constraint. > > So am I got that right, that If I want to have eg custom error messages > for a foreign > key violation, I need to replace all fkeys by

Re: [GENERAL] Custom Constraint Violation Errors

2011-11-07 Thread Michael Musenbrock
Am 2011-11-07 16:06, schrieb Richard Broersma: > On Thu, Nov 3, 2011 at 11:56 PM, Michael Musenbrock wrote: >> But I have not >> found any information if this is possible to create a trigger on a >> constraint violation, and if yes, how could that be done? > You want to use the special type of "CO