On 11/10/11 12:41, Dickson S. Guedes wrote: >> jkt=> UPDATE tbl SET a = -a; >> ERROR: new row for relation "tbl" violates check constraint "tbl_a_check" >> DETAIL: New row with data (x, -10) violates check constraint "tbl_a_check". >> >> The last line, the detailed error message, is added by the patch. > > The patch uses 'New row with data ....' but it was an UPDATE, if you > go further with this patch, IMO the message should be fixed too.
I'm not sure whether the code can determine whether the check gets triggered by an UPDATE or an INSERT (both commands lead to this code path). Please note that the already-existing error message (the "ERROR: " line in the output I enclosed) already uses the phrase "new row". That said, I'll of course be more than happy to include whatever string which fits better, and am open to any suggestions. Cheers, Jan -- Trojita, a fast e-mail client -- http://trojita.flaska.net/
signature.asc
Description: OpenPGP digital signature