From: | Jan Kundrát <jkt(at)flaska(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message |
Date: | 2011-11-10 15:56:32 |
Message-ID: | 4EBBF430.3090904@flaska.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
> information from the primary error message, such as the name of the
> constraint.
Thanks to your comments and suggestions, I appreciate the time of the
reviewers.
Attached is a second version of this patch which keeps the size of the
output at 64 characters per column (which is an arbitrary value defined
as a const int, which I hope matches your style). Longer values have
their last three characters replaced by "...", so there's no way to
distinguish them from a legitimate string that ends with just that.
There's also no escaping of special-string values, similar to how the
BuildIndexValueDescription operates.
Cheers,
Jan
--
Trojita, a fast e-mail client -- http://trojita.flaska.net/
Attachment | Content-Type | Size |
---|---|---|
context_in_check_constraints-v2.patch | text/plain | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-11-10 16:01:54 | Re: Disable OpenSSL compression |
Previous Message | Tom Lane | 2011-11-10 15:37:41 | Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message |