Re: Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: amul sul <sul_amul(at)yahoo(dot)co(dot)in>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()
Date: 2015-12-10 02:50:34
Message-ID: 5668E87A.60406@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015/12/09 18:07, amul sul wrote:
>> On Wednesday, 9 December 2015 12:55 PM, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)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 Content-Type Size
check-con-no-novalid-2.patch text/x-diff 1.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2015-12-10 02:54:53 Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.
Previous Message Noah Misch 2015-12-10 01:23:06 Re: Rework the way multixact truncations work