Re: [HACKERS] [Review] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-29 Thread Jan Kundrát
On 11/29/11 18:51, Tom Lane wrote: > In short, I'm inclined to go ahead and apply this patch, after a bit of > cleanup to make it match our house style better and not break multibyte > characters. Thanks a lot (and sorry for being lazy and not having updated the test cases yet). With kind regards

Re: [HACKERS] [Review] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-21 Thread Jan Kundrát
On 11/16/11 23:13, Royce Ausburn wrote: > The patch fails the regression tests because it is outputting new DETAIL > line which four of tests aren't expecting. The tests will need to be > updated. Hi Royce, thanks for your time which you've put into this review. What is the suggested way to go f

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-13 Thread Jan Kundrát
Hi José and Robert, thanks for your time and a review. Comments below. On 11/10/11 03:47, Robert Haas wrote: > It does this already, without this patch. This patch is about CHECK > constraints, not UNIQUE ones. That's right. This is how to check what the patch changes: jkt=> CREATE TABLE tbl (n

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-13 Thread Jan Kundrát
On 11/10/11 00:48, José Arthur Benetasso Villanova wrote: > First, I couldn't apply it as in the email, even in REL9_0_STABLE: the > offset doesn't look right. Which commit are your repository in? Hi Jose, thanks for looking at the patch. It's based on b07b2bdc570cfbb39564c8a70783dbce1edcb3d6, whi

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Jan Kundrát
On 11/10/11 16:05, Tom Lane wrote: > I agree with Jan that this is probably useful; I'm pretty sure there > have been requests for it before. We just have to make sure that the > length of the message stays in bounds. > > One tip for keeping the length down: there is no value in repeating > infor

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Jan Kundrát
On 11/10/11 13:04, Robert Haas wrote: > Well, if we're going to try to emit some context here, I'd suggest > that we try to output only the columns implicated in the CHECK > constraint, rather than the whole tuple. I'm not sure whether > emitting only a certain amount of output (either total, or f

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Jan Kundrát
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

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Jan Kundrát
Hi José and Robert, thanks for your time and a review. Comments below. On 11/10/11 03:47, Robert Haas wrote: > It does this already, without this patch. This patch is about CHECK > constraints, not UNIQUE ones. That's right. This is how to check what the patch changes: jkt=> CREATE TABLE tbl (n

[HACKERS] [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-06 Thread Jan Kundrát
Hi, when I insert/update many rows at once using INSERT ... SELECT into a table which has plenty of CHECK constraints, the error message that Postgres returns has no indication of which row failed the constraint check. The attached patch tries to provide information in a similar way to how duplicat