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

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()
Дата
Msg-id 5668E87A.60406@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()  (amul sul <sul_amul@yahoo.co.in>)
Ответы Re: Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()  (amul sul <sul_amul@yahoo.co.in>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: Rework the way multixact truncations work
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.