Re: creating CHECK constraints as NOT VALID

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: creating CHECK constraints as NOT VALID
Дата
Msg-id BANLkTim_KqkvWTx1En+RDpEYqNaG2Oxy6w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: creating CHECK constraints as NOT VALID  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: creating CHECK constraints as NOT VALID  (Thom Brown <thom@linux.com>)
Re: creating CHECK constraints as NOT VALID  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On 1 June 2011 23:47, Alvaro Herrera <alvherre@commandprompt.com> wrote:
>
> Here's a complete patch with all this stuff, plus doc additions and
> simple regression tests for the new ALTER DOMAIN commands.
>
>    Enable CHECK constraints to be declared NOT VALID
>
>    This means that they can initially be added to a large existing table
>    without checking its initial contents, but new tuples must comply to
>    them; a separate pass invoked by ALTER TABLE / VALIDATE can verify
>    existing data and ensure it complies with the constraint, at which point
>    it is marked validated and becomes a normal part of the table ecosystem.
>

I think that you also need to update the constraint exclusion code
(get_relation_constraints() or nearby), otherwise the planner might
exclude a relation on the basis of a CHECK constraint that is not
currently VALID.

Regards,
Dean


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

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: procpid?
Следующее
От: Thom Brown
Дата:
Сообщение: Re: creating CHECK constraints as NOT VALID