Re: Fix comment in ATExecValidateConstraint - Mailing list pgsql-hackers

From Amit Langote
Subject Re: Fix comment in ATExecValidateConstraint
Date
Msg-id 6255599b-3dde-ad3e-1520-9dc6482a4257@lab.ntt.co.jp
Whole thread Raw
In response to Re: Fix comment in ATExecValidateConstraint  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2016/07/29 23:50, Robert Haas wrote:
> On Mon, Jul 25, 2016 at 4:18 AM, Amit Langote
> <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> The comment seems to have been copied from ATExecAddColumn, which says:
>>
>>  /*
>>   * If we are told not to recurse, there had better not be any
>> - * child tables; else the addition would put them out of step.
>>
>> For ATExecValidateConstraint, it should say something like:
>>
>> + * child tables; else validating the constraint would put them
>> + * out of step.
>>
>> Attached patch fixes it.
> 
> I agree that the current comment is wrong, but what does "out of step"
> actually mean here, anyway?  I think this isn't very clear.

Like Tom explained over at [1], I guess it means if a constraint is marked
validated in parent, the same constraint in all the children should have
been marked validated as well. Validating just the parent's copy seems to
break this invariant. I admit though that I don't know if the phrase "out
of step" conveys that.

Thanks,
Amit

[1] https://www.postgresql.org/message-id/13658.1470072749%40sss.pgh.pa.us





pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Why --backup-and-modify-in-place in perltidy config?
Next
From: amul sul
Date:
Subject: Re: Bug in to_timestamp().