Re: patch for 9.2: enhanced errors

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Florian Pflug <fgp(at)phlo(dot)org>
Cc: Steve Singer <ssinger_pg(at)sympatico(dot)ca>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch for 9.2: enhanced errors
Date: 2011-06-19 12:03:51
Message-ID: BANLkTi=7CYH6GoPYugGhtrhY=AveJ6rQPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/6/19 Florian Pflug <fgp(at)phlo(dot)org>:
> On Jun19, 2011, at 05:10 , Steve Singer wrote:
>> On 11-06-18 06:36 PM, Steve Singer wrote:
>>> On 11-06-08 04:14 PM, Pavel Stehule wrote:
>>>
>>> Here is my review of this patch
>>>
>>> Submission Review:
>>> ------------------------
>>> The patch applies cleanly against master
>>> The patch does not include any documentation updates (see note below to update config.sgml)
>>> The patch does not include any unit tests. At a minimum it should add a few tests with verbosity set to verbose
>>>
>>
>> On second thought tests might not work. Is the only way to get the constraint details are in verbose mode where line numbers from the c file are also included? If so then this won't work for the regression tests.   Having the diff comparison fail every time someone makes an unrelated change to a source file isn't what we want.
>
> Speaking as someone who's wished for the feature that Pavel's patch provides
> many times in the past - shouldn't there also be a field containing the
> offending value? If we had that, it'd finally be possible to translate
> constraint-related error messages to informative messages for the user.

The value is available in almost cases. There is only one issue - this
should not be only one value - it could be list of values - so basic
question is about format and property name. PostgreSQL doesn't hold
relation between column and column constraint - all column constraints
are transformed to table constrains. All column informations are
derived from constraint - so when constraint is a > b and this
constraint is false, we have two values.

Maybe there is second issue (little bit - performance - you have to
call a output function), But I agree, so this information is very
interesting and can help.

I am open for any ideas in this direction.

Regards

Pavel

>
> best regards,
> Florian Pflug
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2011-06-19 13:09:28 Re: patch for 9.2: enhanced errors
Previous Message Bruce Momjian 2011-06-19 12:00:40 Re: Re: [COMMITTERS] pgsql: Don't use "cp -i" in the example WAL archive_command.