Re: Fix comment in ATExecValidateConstraint
От | Amit Langote |
---|---|
Тема | Re: Fix comment in ATExecValidateConstraint |
Дата | |
Msg-id | 6255599b-3dde-ad3e-1520-9dc6482a4257@lab.ntt.co.jp обсуждение исходный текст |
Ответ на | Re: Fix comment in ATExecValidateConstraint (Robert Haas <robertmhaas@gmail.com>) |
Список | 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 по дате отправления: