Re: Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints() - Mailing list pgsql-hackers

From Amit Langote
Subject Re: Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()
Date
Msg-id 5668E87A.60406@lab.ntt.co.jp
Whole thread Raw
In response to Re: Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()  (amul sul <sul_amul@yahoo.co.in>)
Responses Re: Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()  (amul sul <sul_amul@yahoo.co.in>)
List pgsql-hackers
On 2015/12/09 18:07, amul sul wrote:
>> On Wednesday, 9 December 2015 12:55 PM, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>
>> Thoughts?
>
> Wondering, have you notice failed regression tests?

Here is the updated patch.

> I have tried with new transformCheckConstraints() function & there will be small fix in gram.y.
>
>
> Have look into attached patch & please share your thoughts and/or suggestions.

The transformCheckConstraints approach may be better after all.

By the way,

> @@ -1915,6 +1922,32 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt)
...
> +    if (skipValidation)
> +        foreach(ckclist, cxt->ckconstraints)
> +        {
> +            Constraint *constraint = (Constraint *) lfirst(ckclist);
> +
> +            constraint->skip_validation = true;
> +            constraint->initially_valid = true;
> +        }

You forgot to put braces around the if block.

Thanks,
Amit

Attachment

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Rework the way multixact truncations work
Next
From: Noah Misch
Date:
Subject: Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.